You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/09/10 12:12:36 UTC

[GitHub] [cassandra] adelapena commented on a change in pull request #708: CASSANDRA-15977 4.0 quality testing: Read Repair

adelapena commented on a change in pull request #708:
URL: https://github.com/apache/cassandra/pull/708#discussion_r486286383



##########
File path: test/distributed/org/apache/cassandra/distributed/test/TestBaseImpl.java
##########
@@ -43,4 +51,29 @@ public static void beforeClass() throws Throwable {
         // fact that this code is going to work accross _all_ versions.
         return Cluster.build();
     }
+
+    public static Object list(Object...values)
+    {
+        return CQLTester.list(values);
+    }
+
+    public static Object set(Object...values)
+    {
+        return CQLTester.set(values);
+    }
+
+    public static Object map(Object...values)
+    {
+        return CQLTester.map(values);
+    }
+
+    public static ByteBuffer tuple(Object... values)
+    {
+        return CQLTester.tuple(values).toByteBuffer();
+    }
+
+    public static ByteBuffer udt(Object... values)
+    {
+        return CQLTester.userType(values).toByteBuffer();
+    }

Review comment:
       I'm afraid `ImmutableMap.of` can't be used since it doesn't admit null values like the ones used by the test. I'm instead just copying the `CQLTester#map` method, which is quite small. 
   
   As for UDTs, the only difference with tuples is in the `toCQLString` implementation that we don't use, so they can be replaced by tuples. And for tuples, I have added in `TestBaseImpl` a simplified implementation of `CQLTester#tuple` that only supports not-complex types, so no nested tuples, UDTs not collections are allowed. I think that should be enough for the tests at hand. If we need more complex tuples in the future we should either just fully duplicate `CQLTester` methods or put them in some other place. WDYT?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org