dcapwell commented on code in PR #4684:
URL: https://github.com/apache/cassandra/pull/4684#discussion_r3149388336


##########
test/distributed/org/apache/cassandra/distributed/test/accord/AccordCQLTestBase.java:
##########
@@ -330,6 +338,79 @@ public void testPartitionMultiRowReturn() throws Exception
         });
     }
 
+    @Test
+    public void testSinglePartitionKeyBatch() throws Throwable
+    {
+        List<String> ddls = Arrays.asList("DROP KEYSPACE IF EXISTS " + 
KEYSPACE + ';',
+                                          "CREATE KEYSPACE " + KEYSPACE + " 
WITH REPLICATION={'class':'SimpleStrategy', 'replication_factor': 2}",
+                                          "CREATE TABLE " + 
qualifiedAccordTableName + " (k int PRIMARY KEY, v int) WITH " + 
transactionalMode.asCqlParam(),
+                                          "CREATE TABLE " + 
qualifiedRegularTableName + " (k int PRIMARY KEY, v int)");
+
+        test(ddls, cluster -> {
+            cluster.coordinator(1).execute("BEGIN BATCH\n" +
+                                           "INSERT INTO " + 
qualifiedAccordTableName + " (k, v) VALUES (1, 2);\n" +
+                                           "INSERT INTO " + 
qualifiedRegularTableName + " (k, v) VALUES (1, 3);\n" +
+                                           "APPLY BATCH;", 
ConsistencyLevel.ONE);
+
+            SimpleQueryResult r1 = 
cluster.coordinator(1).executeWithResult("SELECT * FROM " + 
qualifiedAccordTableName + " WHERE k = 1", ConsistencyLevel.ONE);
+            SimpleQueryResult r2 = 
cluster.coordinator(1).executeWithResult("SELECT * FROM " + 
qualifiedRegularTableName + " WHERE k = 1", ConsistencyLevel.ONE);
+
+            assertEquals(1, r1.toObjectArrays().length);
+            assertEquals(1, r2.toObjectArrays().length);

Review Comment:
   this tests that we get data, but this test passes today without the patch 
right?  We don't validate we actually did anything?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to