Skip to content

Commit 2e5432b

Browse files
committed
Added version protection for correct pre/post TCM behaviours
1 parent 832c418 commit 2e5432b

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

bootstrap_test.py

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,12 @@ def test_read_from_bootstrapped_node(self):
250250
"""
251251
cluster = self.cluster
252252
cluster.set_environment_variable('CASSANDRA_TOKEN_PREGENERATION_DISABLED', 'True')
253-
# Nodes need to be started one by one, not all at once. See CASSANDRA-19097
254253
cluster.populate(3)
255-
cluster.nodelist()[0].start(wait_for_binary_proto=True)
256-
cluster.nodelist()[1].start(wait_for_binary_proto=True)
257-
cluster.nodelist()[2].start(wait_for_binary_proto=True)
254+
if cluster.version() <= '4.1':
255+
# Nodes need to be started one by one pre-TCM, not all at once. See CASSANDRA-19097
256+
cluster.nodelist()[0].start(wait_for_binary_proto=True)
257+
cluster.nodelist()[1].start(wait_for_binary_proto=True)
258+
cluster.nodelist()[2].start(wait_for_binary_proto=True)
258259
cluster.start()
259260

260261
node1 = cluster.nodes['node1']
@@ -522,10 +523,11 @@ def test_manual_bootstrap(self):
522523
"""
523524
cluster = self.cluster
524525
cluster.set_environment_variable('CASSANDRA_TOKEN_PREGENERATION_DISABLED', 'True')
525-
# Nodes need to be started one by one, not all at once. See CASSANDRA-19097
526526
cluster.populate(2)
527-
cluster.nodelist()[0].start(wait_for_binary_proto=True)
528-
cluster.nodelist()[1].start(wait_for_binary_proto=True)
527+
if cluster.version() <= '4.1':
528+
# Nodes need to be started one by one pre-TCM, not all at once. See CASSANDRA-19097
529+
cluster.nodelist()[0].start(wait_for_binary_proto=True)
530+
cluster.nodelist()[1].start(wait_for_binary_proto=True)
529531
cluster.start()
530532
(node1, node2) = cluster.nodelist()
531533

@@ -627,11 +629,12 @@ def _wiped_node_cannot_join_test(self, gently):
627629
"""
628630
cluster = self.cluster
629631
cluster.set_environment_variable('CASSANDRA_TOKEN_PREGENERATION_DISABLED', 'True')
630-
# Nodes need to be started one by one, not all at once. See CASSANDRA-19097
631632
cluster.populate(3)
632-
cluster.nodelist()[0].start(wait_for_binary_proto=True)
633-
cluster.nodelist()[1].start(wait_for_binary_proto=True)
634-
cluster.nodelist()[2].start(wait_for_binary_proto=True)
633+
if cluster.version() <= '4.1':
634+
# Nodes need to be started one by one pre-TCM, not all at once. See CASSANDRA-19097
635+
cluster.nodelist()[0].start(wait_for_binary_proto=True)
636+
cluster.nodelist()[1].start(wait_for_binary_proto=True)
637+
cluster.nodelist()[2].start(wait_for_binary_proto=True)
635638
cluster.start()
636639

637640
stress_table = 'keyspace1.standard1'
@@ -666,11 +669,12 @@ def test_decommissioned_wiped_node_can_join(self):
666669
"""
667670
cluster = self.cluster
668671
cluster.set_environment_variable('CASSANDRA_TOKEN_PREGENERATION_DISABLED', 'True')
669-
# Nodes need to be started one by one, not all at once. See CASSANDRA-19097
670672
cluster.populate(3)
671-
cluster.nodelist()[0].start(wait_for_binary_proto=True)
672-
cluster.nodelist()[1].start(wait_for_binary_proto=True)
673-
cluster.nodelist()[2].start(wait_for_binary_proto=True)
673+
if cluster.version() <= '4.1':
674+
# Nodes need to be started one by one pre-TCM, not all at once. See CASSANDRA-19097
675+
cluster.nodelist()[0].start(wait_for_binary_proto=True)
676+
cluster.nodelist()[1].start(wait_for_binary_proto=True)
677+
cluster.nodelist()[2].start(wait_for_binary_proto=True)
674678
cluster.start()
675679

676680
stress_table = 'keyspace1.standard1'

0 commit comments

Comments
 (0)