cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcken...@apache.org
Subject [1/5] cassandra git commit: Uncomment wrongly commented tests
Date Wed, 11 Mar 2015 16:27:52 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 39deb31c4 -> c38ea0b1b


Uncomment wrongly commented tests


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

Branch: refs/heads/trunk
Commit: 699b57523b31e93fd0d0ed6fd580ae8b052c248b
Parents: 9ee34b6
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Wed Mar 11 12:03:55 2015 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Wed Mar 11 12:03:55 2015 +0100

----------------------------------------------------------------------
 .../apache/cassandra/cql3/CollectionsTest.java  | 234 +++++++++----------
 1 file changed, 117 insertions(+), 117 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/699b5752/test/unit/org/apache/cassandra/cql3/CollectionsTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/cql3/CollectionsTest.java b/test/unit/org/apache/cassandra/cql3/CollectionsTest.java
index 2380c38..3d41ad6 100644
--- a/test/unit/org/apache/cassandra/cql3/CollectionsTest.java
+++ b/test/unit/org/apache/cassandra/cql3/CollectionsTest.java
@@ -21,29 +21,29 @@ import org.junit.Test;
 
 public class CollectionsTest extends CQLTester
 {
-    //@Test
-    //public void testMapBulkRemoval() throws Throwable
-    //{
-    //    createTable("CREATE TABLE %s (k int PRIMARY KEY, m map<text, text>)");
+    @Test
+    public void testMapBulkRemoval() throws Throwable
+    {
+        createTable("CREATE TABLE %s (k int PRIMARY KEY, m map<text, text>)");
 
-    //    execute("INSERT INTO %s(k, m) VALUES (?, ?)", 0, map("k1", "v1", "k2", "v2", "k3",
"v3"));
+        execute("INSERT INTO %s(k, m) VALUES (?, ?)", 0, map("k1", "v1", "k2", "v2", "k3",
"v3"));
 
-    //    assertRows(execute("SELECT * FROM %s"),
-    //        row(0, map("k1", "v1", "k2", "v2", "k3", "v3"))
-    //    );
+        assertRows(execute("SELECT * FROM %s"),
+            row(0, map("k1", "v1", "k2", "v2", "k3", "v3"))
+        );
 
-    //    execute("UPDATE %s SET m = m - ? WHERE k = ?", set("k2"), 0);
+        execute("UPDATE %s SET m = m - ? WHERE k = ?", set("k2"), 0);
 
-    //    assertRows(execute("SELECT * FROM %s"),
-    //        row(0, map("k1", "v1", "k3", "v3"))
-    //    );
+        assertRows(execute("SELECT * FROM %s"),
+            row(0, map("k1", "v1", "k3", "v3"))
+        );
 
-    //    execute("UPDATE %s SET m = m + ?, m = m - ? WHERE k = ?", map("k4", "v4"), set("k3"),
0);
+        execute("UPDATE %s SET m = m + ?, m = m - ? WHERE k = ?", map("k4", "v4"), set("k3"),
0);
 
-    //    assertRows(execute("SELECT * FROM %s"),
-    //        row(0, map("k1", "v1", "k4", "v4"))
-    //    );
-    //}
+        assertRows(execute("SELECT * FROM %s"),
+            row(0, map("k1", "v1", "k4", "v4"))
+        );
+    }
 
     @Test
     public void testInvalidCollectionsMix() throws Throwable
@@ -71,146 +71,146 @@ public class CollectionsTest extends CQLTester
         assertInvalid("UPDATE %s SET m = m - ? WHERE k = 0", map("a", "b", "c", "d"));
     }
 
-    //@Test
-    //public void testSets() throws Throwable
-    //{
-    //    createTable("CREATE TABLE %s (k int PRIMARY KEY, s set<text>)");
+    @Test
+    public void testSets() throws Throwable
+    {
+        createTable("CREATE TABLE %s (k int PRIMARY KEY, s set<text>)");
 
-    //    execute("INSERT INTO %s(k, s) VALUES (0, ?)", set("v1", "v2", "v3", "v4"));
+        execute("INSERT INTO %s(k, s) VALUES (0, ?)", set("v1", "v2", "v3", "v4"));
 
-    //    assertRows(execute("SELECT s FROM %s WHERE k = 0"),
-    //        row(set("v1", "v2", "v3", "v4"))
-    //    );
+        assertRows(execute("SELECT s FROM %s WHERE k = 0"),
+            row(set("v1", "v2", "v3", "v4"))
+        );
 
-    //    execute("DELETE s[?] FROM %s WHERE k = 0", "v1");
+        execute("DELETE s[?] FROM %s WHERE k = 0", "v1");
 
-    //    assertRows(execute("SELECT s FROM %s WHERE k = 0"),
-    //        row(set("v2", "v3", "v4"))
-    //    );
+        assertRows(execute("SELECT s FROM %s WHERE k = 0"),
+            row(set("v2", "v3", "v4"))
+        );
 
-    //    // Full overwrite
-    //    execute("UPDATE %s SET s = ? WHERE k = 0", set("v6", "v5"));
+        // Full overwrite
+        execute("UPDATE %s SET s = ? WHERE k = 0", set("v6", "v5"));
 
-    //    assertRows(execute("SELECT s FROM %s WHERE k = 0"),
-    //        row(set("v5", "v6"))
-    //    );
+        assertRows(execute("SELECT s FROM %s WHERE k = 0"),
+            row(set("v5", "v6"))
+        );
 
-    //    execute("UPDATE %s SET s = s + ? WHERE k = 0", set("v7"));
+        execute("UPDATE %s SET s = s + ? WHERE k = 0", set("v7"));
 
-    //    assertRows(execute("SELECT s FROM %s WHERE k = 0"),
-    //        row(set("v5", "v6", "v7"))
-    //    );
+        assertRows(execute("SELECT s FROM %s WHERE k = 0"),
+            row(set("v5", "v6", "v7"))
+        );
 
-    //    execute("UPDATE %s SET s = s - ? WHERE k = 0", set("v6", "v5"));
+        execute("UPDATE %s SET s = s - ? WHERE k = 0", set("v6", "v5"));
 
-    //    assertRows(execute("SELECT s FROM %s WHERE k = 0"),
-    //        row(set("v7"))
-    //    );
+        assertRows(execute("SELECT s FROM %s WHERE k = 0"),
+            row(set("v7"))
+        );
 
-    //    execute("DELETE s FROM %s WHERE k = 0");
+        execute("DELETE s FROM %s WHERE k = 0");
 
-    //    assertRows(execute("SELECT s FROM %s WHERE k = 0"),
-    //        row((Object)null)
-    //    );
-    //}
+        assertRows(execute("SELECT s FROM %s WHERE k = 0"),
+            row((Object)null)
+        );
+    }
 
-    //@Test
-    //public void testMaps() throws Throwable
-    //{
-    //    createTable("CREATE TABLE %s (k int PRIMARY KEY, m map<text, int>)");
+    @Test
+    public void testMaps() throws Throwable
+    {
+        createTable("CREATE TABLE %s (k int PRIMARY KEY, m map<text, int>)");
 
-    //    execute("INSERT INTO %s(k, m) VALUES (0, ?)", map("v1", 1, "v2", 2));
+        execute("INSERT INTO %s(k, m) VALUES (0, ?)", map("v1", 1, "v2", 2));
 
-    //    assertRows(execute("SELECT m FROM %s WHERE k = 0"),
-    //        row(map("v1", 1, "v2", 2))
-    //    );
+        assertRows(execute("SELECT m FROM %s WHERE k = 0"),
+            row(map("v1", 1, "v2", 2))
+        );
 
-    //    execute("UPDATE %s SET m[?] = ?, m[?] = ? WHERE k = 0", "v3", 3, "v4", 4);
+        execute("UPDATE %s SET m[?] = ?, m[?] = ? WHERE k = 0", "v3", 3, "v4", 4);
 
-    //    assertRows(execute("SELECT m FROM %s WHERE k = 0"),
-    //        row(map("v1", 1, "v2", 2, "v3", 3, "v4", 4))
-    //    );
+        assertRows(execute("SELECT m FROM %s WHERE k = 0"),
+            row(map("v1", 1, "v2", 2, "v3", 3, "v4", 4))
+        );
 
-    //    execute("DELETE m[?] FROM %s WHERE k = 0", "v1");
+        execute("DELETE m[?] FROM %s WHERE k = 0", "v1");
 
-    //    assertRows(execute("SELECT m FROM %s WHERE k = 0"),
-    //        row(map("v2", 2, "v3", 3, "v4", 4))
-    //    );
+        assertRows(execute("SELECT m FROM %s WHERE k = 0"),
+            row(map("v2", 2, "v3", 3, "v4", 4))
+        );
 
-    //    // Full overwrite
-    //    execute("UPDATE %s SET m = ? WHERE k = 0", map("v6", 6, "v5", 5));
+        // Full overwrite
+        execute("UPDATE %s SET m = ? WHERE k = 0", map("v6", 6, "v5", 5));
 
-    //    assertRows(execute("SELECT m FROM %s WHERE k = 0"),
-    //        row(map("v5", 5, "v6", 6))
-    //    );
+        assertRows(execute("SELECT m FROM %s WHERE k = 0"),
+            row(map("v5", 5, "v6", 6))
+        );
 
-    //    execute("UPDATE %s SET m = m + ? WHERE k = 0", map("v7", 7));
+        execute("UPDATE %s SET m = m + ? WHERE k = 0", map("v7", 7));
 
-    //    assertRows(execute("SELECT m FROM %s WHERE k = 0"),
-    //        row(map("v5", 5, "v6", 6, "v7", 7))
-    //    );
+        assertRows(execute("SELECT m FROM %s WHERE k = 0"),
+            row(map("v5", 5, "v6", 6, "v7", 7))
+        );
 
-    //    // The empty map is parsed as an empty set (because we don't have enough info at
parsing
-    //    // time when we see a {}) and special cased later. This test checks this work properly
-    //    execute("UPDATE %s SET m = {} WHERE k = 0");
+        // The empty map is parsed as an empty set (because we don't have enough info at
parsing
+        // time when we see a {}) and special cased later. This test checks this work properly
+        execute("UPDATE %s SET m = {} WHERE k = 0");
 
-    //    assertRows(execute("SELECT m FROM %s WHERE k = 0"),
-    //        row((Object)null)
-    //    );
-    //}
+        assertRows(execute("SELECT m FROM %s WHERE k = 0"),
+            row((Object)null)
+        );
+    }
 
-    //@Test
-    //public void testLists() throws Throwable
-    //{
-    //    createTable("CREATE TABLE %s (k int PRIMARY KEY, l list<text>)");
+    @Test
+    public void testLists() throws Throwable
+    {
+        createTable("CREATE TABLE %s (k int PRIMARY KEY, l list<text>)");
 
-    //    execute("INSERT INTO %s(k, l) VALUES (0, ?)", list("v1", "v2", "v3"));
+        execute("INSERT INTO %s(k, l) VALUES (0, ?)", list("v1", "v2", "v3"));
 
-    //    assertRows(execute("SELECT l FROM %s WHERE k = 0"),
-    //        row(list("v1", "v2", "v3"))
-    //    );
+        assertRows(execute("SELECT l FROM %s WHERE k = 0"),
+            row(list("v1", "v2", "v3"))
+        );
 
-    //    execute("DELETE l[?] FROM %s WHERE k = 0", 1);
+        execute("DELETE l[?] FROM %s WHERE k = 0", 1);
 
-    //    assertRows(execute("SELECT l FROM %s WHERE k = 0"),
-    //        row(list("v1", "v3"))
-    //    );
+        assertRows(execute("SELECT l FROM %s WHERE k = 0"),
+            row(list("v1", "v3"))
+        );
 
-    //    execute("UPDATE %s SET l[?] = ? WHERE k = 0", 1, "v4");
+        execute("UPDATE %s SET l[?] = ? WHERE k = 0", 1, "v4");
 
-    //    assertRows(execute("SELECT l FROM %s WHERE k = 0"),
-    //        row(list("v1", "v4"))
-    //    );
+        assertRows(execute("SELECT l FROM %s WHERE k = 0"),
+            row(list("v1", "v4"))
+        );
 
-    //    // Full overwrite
-    //    execute("UPDATE %s SET l = ? WHERE k = 0", list("v6", "v5"));
+        // Full overwrite
+        execute("UPDATE %s SET l = ? WHERE k = 0", list("v6", "v5"));
 
-    //    assertRows(execute("SELECT l FROM %s WHERE k = 0"),
-    //        row(list("v6", "v5"))
-    //    );
+        assertRows(execute("SELECT l FROM %s WHERE k = 0"),
+            row(list("v6", "v5"))
+        );
 
-    //    execute("UPDATE %s SET l = l + ? WHERE k = 0", list("v7", "v8"));
+        execute("UPDATE %s SET l = l + ? WHERE k = 0", list("v7", "v8"));
 
-    //    assertRows(execute("SELECT l FROM %s WHERE k = 0"),
-    //        row(list("v6", "v5", "v7", "v8"))
-    //    );
+        assertRows(execute("SELECT l FROM %s WHERE k = 0"),
+            row(list("v6", "v5", "v7", "v8"))
+        );
 
-    //    execute("UPDATE %s SET l = ? + l WHERE k = 0", list("v9"));
+        execute("UPDATE %s SET l = ? + l WHERE k = 0", list("v9"));
 
-    //    assertRows(execute("SELECT l FROM %s WHERE k = 0"),
-    //        row(list("v9", "v6", "v5", "v7", "v8"))
-    //    );
+        assertRows(execute("SELECT l FROM %s WHERE k = 0"),
+            row(list("v9", "v6", "v5", "v7", "v8"))
+        );
 
-    //    execute("UPDATE %s SET l = l - ? WHERE k = 0", list("v5", "v8"));
+        execute("UPDATE %s SET l = l - ? WHERE k = 0", list("v5", "v8"));
 
-    //    assertRows(execute("SELECT l FROM %s WHERE k = 0"),
-    //        row(list("v9", "v6", "v7"))
-    //    );
+        assertRows(execute("SELECT l FROM %s WHERE k = 0"),
+            row(list("v9", "v6", "v7"))
+        );
 
-    //    execute("DELETE l FROM %s WHERE k = 0");
+        execute("DELETE l FROM %s WHERE k = 0");
 
-    //    assertRows(execute("SELECT l FROM %s WHERE k = 0"),
-    //        row((Object)null)
-    //    );
-    //}
+        assertRows(execute("SELECT l FROM %s WHERE k = 0"),
+            row((Object)null)
+        );
+    }
 }


Mime
View raw message