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

Method testErrorLogFile

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

Source from the content-addressed store, hash-verified

109 }
110
111 @Test
112 public void testErrorLogFile() throws Exception {
113 PrintWriter w = new PrintWriter(new FileWriter(PIG_FILE));
114 w.println("A = load '" + INPUT_FILE + "' as (a0:int, a1:int, a2:int);");
115 w.println("B = foreach A generate StringSize(a0);");
116 w.println("store B into '" + OUTPUT_FILE + "';");
117 w.close();
118
119 try {
120 String[] args = { "-x", "local", PIG_FILE };
121 PigStats stats = PigRunner.run(args, null);
122
123 assertTrue(!stats.isSuccessful());
124
125 Properties props = stats.getPigProperties();
126 String logfile = props.getProperty("pig.logfile");
127 File f = new File(logfile);
128 assertTrue(f.exists());
129 } finally {
130 new File(PIG_FILE).delete();
131 }
132 }
133
134 @Test
135 public void testErrorLogFile2() throws Exception {

Callers

nothing calls this directly

Calls 7

runMethod · 0.95
isSuccessfulMethod · 0.95
getPigPropertiesMethod · 0.95
getPropertyMethod · 0.80
closeMethod · 0.65
existsMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected