MCPcopy Create free account
hub / github.com/apache/pig / fsCommandTest

Method fsCommandTest

test/org/apache/pig/test/TestPigRunner.java:826–841  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

824 }
825
826 @Test
827 public void fsCommandTest() throws Exception {
828 PrintWriter w = new PrintWriter(new FileWriter(PIG_FILE));
829 w.println("fs -mv nonexist.file dummy.file");
830 w.close();
831
832 try {
833 String[] args = { "-x", execType, PIG_FILE };
834 PigStats stats = PigRunner.run(args, new TestNotificationListener(execType));
835
836 assertTrue(!stats.isSuccessful());
837 assertTrue(stats.getReturnCode() == PigRunner.ReturnCode.IO_EXCEPTION);
838 } finally {
839 new File(PIG_FILE).delete();
840 }
841 }
842
843 @Test // PIG-2006
844 public void testEmptyFile() throws IOException {

Callers

nothing calls this directly

Calls 5

runMethod · 0.95
isSuccessfulMethod · 0.95
getReturnCodeMethod · 0.95
closeMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected