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 2021/02/01 12:50:34 UTC

[GitHub] [cassandra] adelapena commented on a change in pull request #870: CASSANDRA-16296 Warn on KS creation when RF > nodes

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



##########
File path: test/unit/org/apache/cassandra/cql3/validation/operations/CreateTest.java
##########
@@ -365,6 +372,31 @@ public void testKeyspace() throws Throwable
         execute("DROP KEYSPACE testXYZ");
     }
 
+    /**
+     *  Test a warning is thrown on create keyspace with a RF > number of nodes.
+     */
+    @Test
+    public void testCreateKeyspaceRFgtNodesWarns() throws Throwable

Review comment:
       I can run that test alone with `ant testsome -Dtest.name=org.apache.cassandra.cql3.validation.operations.CreateTest -Dtest.methods=testCreateKeyspaceRFgtNodesWarns`. That produces a NPE while getting the warnings unless we call `requireNetwork()`. However, as you said there are other tests for warnings that pass without requiring network:
   ```
   ant testsome -Dtest.name=org.apache.cassandra.cql3.ViewTest -Dtest.methods=testClientWarningOnCreate
   ant testsome -Dtest.name=org.apache.cassandra.cql3.validation.entities.UFSecurityTest -Dtest.methods=testAmokUDF
   ant testsome -Dtest.name=org.apache.cassandra.index.sasi.SASICQLTest -Dtest.methods=testClientWarningOnCreate
   ```
   I'm not sure what is the reason for that difference, maybe it's related to where the call to `ClientWarn.instance.warn` is done?




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