Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
NoTrace7 committed Mar 13, 2015
1 parent c538c02 commit 0f1bb3e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ public void setUp() throws IOException {
@Test
public void testGenerateDumpScript() throws IOException {
Path dumpScript = new Path(TEST_DIR + SCRIPT_NAME);
HeapDumpForTaskUtils.generateDumpScript(dumpScript, fs, "test.hprof", "chmod 777 ");
Assert.assertEquals(true, fs.exists(dumpScript));
Assert.assertEquals(true, fs.exists(new Path(dumpScript.getParent() + "/dumps/")));
HeapDumpForTaskUtils.generateDumpScript(dumpScript, this.fs, "test.hprof", "chmod 777 ");
Assert.assertEquals(true, this.fs.exists(dumpScript));
Assert.assertEquals(true, this.fs.exists(new Path(dumpScript.getParent() + "/dumps/")));
Closer closer = Closer.create();
BufferedReader scriptReader = closer.register(new BufferedReader(new InputStreamReader(fs.open(dumpScript))));
BufferedReader scriptReader = closer.register(new BufferedReader(new InputStreamReader(this.fs.open(dumpScript))));
Assert.assertEquals("#!/bin/sh", scriptReader.readLine());
Assert.assertEquals("hadoop dfs -put test.hprof dumpScript/dumps/${PWD//\\//_}.hprof", scriptReader.readLine());
}
Expand Down

0 comments on commit 0f1bb3e

Please sign in to comment.