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

Method testGetNextTuple

test/org/apache/pig/test/TestFilter.java:84–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82 }
83
84 @Test
85 public void testGetNextTuple() throws Exception {
86 pass.attachInput(t);
87 Result res = pass.getNextTuple();
88 assertEquals(t, res.result);
89 fail.attachInput(t);
90 res = fail.getNextTuple();
91 assertEquals(res.returnStatus, POStatus.STATUS_EOP);
92
93 for (int i = 0; i < nullFlags.length; i++) {
94 int count = 0;
95 setUpProjFil(nullFlags[i]);
96 while (true) {
97 res = projFil.getNextTuple();
98 if (res.returnStatus == POStatus.STATUS_EOP)
99 break;
100 count++;
101 assertEquals(POStatus.STATUS_OK, res.returnStatus);
102 Tuple output = (Tuple)res.result;
103 assertEquals(
104 "Running testGetNextTuple with nullFlags set to " + nullFlags[i] + ":",
105 true, TestHelper.bagContains(inp, output));
106 assertEquals(
107 "Running testGetNextTuple with nullFlags set to " + nullFlags[i] + ":",
108 true, (Integer)((Tuple)res.result).get(1) > 50);
109 }
110 assertEquals("Running testGetNextTuple with nullFlags set to " + nullFlags[i] + ":",
111 getExpCount(inp), count);
112
113 }
114 }
115
116 /**
117 * @param inp2

Callers

nothing calls this directly

Calls 7

setUpProjFilMethod · 0.95
bagContainsMethod · 0.95
getExpCountMethod · 0.95
getNextTupleMethod · 0.65
getMethod · 0.65
attachInputMethod · 0.45
assertEqualsMethod · 0.45

Tested by

no test coverage detected