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

Method testEmptyFile

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

Source from the content-addressed store, hash-verified

841 }
842
843 @Test // PIG-2006
844 public void testEmptyFile() throws IOException {
845 File f1 = new File(PIG_FILE);
846
847 FileWriter fw1 = new FileWriter(f1);
848 fw1.close();
849
850 try {
851 String[] args = { "-x", "local", "-c", PIG_FILE };
852 PigStats stats = PigRunner.run(args, null);
853
854 assertTrue(stats.isSuccessful());
855 assertEquals( 0, stats.getReturnCode() );
856 } finally {
857 new File(PIG_FILE).delete();
858 Util.deleteFile(cluster, OUTPUT_FILE);
859 }
860 }
861
862 @Test
863 public void returnCodeTest() throws Exception {

Callers

nothing calls this directly

Calls 7

runMethod · 0.95
isSuccessfulMethod · 0.95
getReturnCodeMethod · 0.95
deleteFileMethod · 0.95
closeMethod · 0.65
deleteMethod · 0.65
assertEqualsMethod · 0.45

Tested by

no test coverage detected