adelapena commented on a change in pull request #117:
URL: https://github.com/apache/cassandra-dtest/pull/117#discussion_r570340547



##########
File path: bootstrap_test.py
##########
@@ -280,6 +280,53 @@ def 
test_consistent_range_movement_true_with_rf1_should_fail(self):
     def test_consistent_range_movement_false_with_rf1_should_succeed(self):
         self._bootstrap_test_with_replica_down(False, rf=1)
 
+    def test_rf_gt_nodes_multidc_should_succeed(self):
+        """
+        Test creating a KS with RF > N on multi DC doesn't break bootstrap
+        @jira_ticket CASSANDRA-16296 CASSANDRA-16411
+        """
+        cluster = self.cluster
+        
cluster.set_environment_variable('CASSANDRA_TOKEN_PREGENERATION_DISABLED', 
'True')
+        cluster.populate([1, 1])
+        cluster.start()
+
+        node1 = cluster.nodelist()[0]
+        session = self.patient_cql_connection(node1)
+        session.execute("CREATE KEYSPACE k WITH REPLICATION = {'class' : 
'NetworkTopologyStrategy', 'dc1' : '3'}")
+        warning = 'Your replication factor 3 for keyspace k is higher than the 
number of nodes 1 for datacenter dc1'
+        warnings_total = 0

Review comment:
       Nit: this could be into the `if` block body. The same applies for the 
second initialization of `warnings_total` below.

##########
File path: bootstrap_test.py
##########
@@ -280,6 +280,53 @@ def 
test_consistent_range_movement_true_with_rf1_should_fail(self):
     def test_consistent_range_movement_false_with_rf1_should_succeed(self):
         self._bootstrap_test_with_replica_down(False, rf=1)
 
+    def test_rf_gt_nodes_multidc_should_succeed(self):
+        """
+        Test creating a KS with RF > N on multi DC doesn't break bootstrap

Review comment:
       Nit: now it's creating and altering a keyspace.




----------------------------------------------------------------
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:
[email protected]



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

Reply via email to