maedhroz commented on code in PR #4518:
URL: https://github.com/apache/cassandra/pull/4518#discussion_r2612054365


##########
test/distributed/org/apache/cassandra/distributed/test/accord/AccordCQLTestBase.java:
##########
@@ -3415,4 +3415,20 @@ public void multiPartitionUpdate() throws Exception
             }
         });
     }
+
+    @Test
+    public void userSeesInvalidRejection() throws Exception
+    {
+        var expectedType = 
AssertionUtils.isInstanceof(InvalidRequestException.class);
+        test("CREATE TABLE " + qualifiedAccordTableName + "(k int PRIMARY KEY, 
l list<int>) WITH " + transactionalMode.asCqlParam(), cluster -> {
+            String cql = "UPDATE " + qualifiedAccordTableName + " SET l[0] = 
42 WHERE k=42";
+            Assertions.assertThatThrownBy(() -> 
cluster.coordinator(1).execute(cql, QUORUM))
+                      .is(expectedType)
+                      .hasMessage("Attempted to set an element on a list which 
is null");
+
+            Assertions.assertThatThrownBy(() -> 
cluster.coordinator(1).execute(wrapInTxn(cql), QUORUM))
+                      .is(expectedType)
+                      .hasMessage("Attempted to set an element on a list which 
is null");

Review Comment:
   nit: It would be nice to not duplicate the error message text I guess, but 
we don't seem to be in the habit of doing that in `Lists`.



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