Author: rohini
Date: Fri Jan  2 19:49:40 2015
New Revision: 1649100

URL: http://svn.apache.org/r1649100
Log:
PIG-4282: Enable unit test TestForEachNestedPlan for spark (kellyzly via rohini)

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/test/org/apache/pig/test/TestForEachNestedPlan.java

Modified: pig/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1649100&r1=1649099&r2=1649100&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Fri Jan  2 19:49:40 2015
@@ -30,7 +30,9 @@ PIG-4333: Split BigData tests into multi
  
 BUG FIXES
 
-PIG-4361: Fix perl script problem in TestStreaming.java (liyun via xuefu)
+PIG-4282: Enable unit test "TestForEachNestedPlan" for spark (kellyzly via 
rohini) 
+
+PIG-4361: Fix perl script problem in TestStreaming.java (kellyzly via xuefu)
 
 PIG-4354: Port local mode tests to Tez - part3 (daijy)
 

Modified: pig/trunk/test/org/apache/pig/test/TestForEachNestedPlan.java
URL: 
http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestForEachNestedPlan.java?rev=1649100&r1=1649099&r2=1649100&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestForEachNestedPlan.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestForEachNestedPlan.java Fri Jan  2 
19:49:40 2015
@@ -214,18 +214,10 @@ public class TestForEachNestedPlan {
                        "generate group, MIN(E); };");
 
             Iterator<Tuple> iter = pig.openIterator("C");
-
             List<Tuple> expectedResults =
                 Util.getTuplesFromConstantTupleStrings(
                         new String[] {"(10,68)", "(20,78)"});
-
-            int counter = 0;
-            while (iter.hasNext()) {
-               assertEquals(expectedResults.get(counter++).toString(),
-                        iter.next().toString());
-            }
-
-            assertEquals(expectedResults.size(), counter);
+            Util.checkQueryOutputsAfterSort(iter, expectedResults);
         } finally{
             new File(INPUT_FILE).delete();
             try {
@@ -263,14 +255,7 @@ public class TestForEachNestedPlan {
             List<Tuple> expectedResults =
                 Util.getTuplesFromConstantTupleStrings(
                         new String[] {"(1,3)", "(1,4)", "(2,3)", "(2,4)"});
-
-            int counter = 0;
-            while (iter.hasNext()) {
-                assertEquals(expectedResults.get(counter++).toString(),
-                        iter.next().toString());
-            }
-
-            assertEquals(expectedResults.size(), counter);
+            Util.checkQueryOutputsAfterSort(iter, expectedResults);
         } finally{
             new File(INPUT_FILE).delete();
             try {


Reply via email to