cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [2/3] git commit: Fix failing pig test
Date Fri, 14 Mar 2014 19:53:11 GMT
Fix failing pig test

Patch by Alex Liu, reviewed by brandonwilliams for CASSANDRA-6376


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8c52cc0e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8c52cc0e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8c52cc0e

Branch: refs/heads/cassandra-2.0
Commit: 8c52cc0e7f67378d66093c958558e765b682888f
Parents: 972d3da
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Fri Mar 14 14:46:53 2014 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Fri Mar 14 14:46:53 2014 -0500

----------------------------------------------------------------------
 .../unit/org/apache/cassandra/pig/CqlTableTest.java | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8c52cc0e/test/unit/org/apache/cassandra/pig/CqlTableTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/pig/CqlTableTest.java b/test/unit/org/apache/cassandra/pig/CqlTableTest.java
index 785d819..55586c7 100644
--- a/test/unit/org/apache/cassandra/pig/CqlTableTest.java
+++ b/test/unit/org/apache/cassandra/pig/CqlTableTest.java
@@ -174,18 +174,18 @@ public class CqlTableTest extends PigTestBase
         pig.registerQuery("STORE recs INTO 'cql://cql3ks/collectiontable?" + defaultParameters
+ "&output_query=update+cql3ks.collectiontable+set+n+%3D+%3F' USING CqlStorage();");
         pig.executeBatch();
 
-        //(book2,((m,mm),(n,nn)))
-        //(book3,((m,mm),(n,nn)))
-        //(book4,((m,mm),(n,nn)))
-        //(book1,((m,mm),(n,nn)))
+        //(book2,((key2, value2),(m,mm),(n,nn)))
+        //(book3,((key3, value3),(m,mm),(n,nn)))
+        //(book4,((key4, value4),(m,mm),(n,nn)))
+        //(book1,((key1, value1),(m,mm),(n,nn)))
         pig.registerQuery("result= LOAD 'cql://cql3ks/collectiontable?" + defaultParameters
+ "' USING CqlStorage();");
         Iterator<Tuple> it = pig.openIterator("result");
-        if (it.hasNext()) {
+        while (it.hasNext()) {
             Tuple t = it.next();
             Tuple t1 = (Tuple) t.get(1);
-            Assert.assertEquals(t1.size(), 2);
-            Tuple element1 = (Tuple) t1.get(0);
-            Tuple element2 = (Tuple) t1.get(1);
+            Assert.assertEquals(t1.size(), 3);
+            Tuple element1 = (Tuple) t1.get(1);
+            Tuple element2 = (Tuple) t1.get(2);
             Assert.assertEquals(element1.get(0), "m");
             Assert.assertEquals(element1.get(1), "mm");
             Assert.assertEquals(element2.get(0), "n");


Mime
View raw message