Skip to content

Commit

Permalink
[CASSANDRA-15016]: Add compatibility_flag to test_simple_bootstrap_mi…
Browse files Browse the repository at this point in the history
…xed_versions
  • Loading branch information
vinaykumarchella committed Feb 8, 2019
1 parent e6f58cb commit adcc84d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions bootstrap_test.py
Expand Up @@ -44,11 +44,16 @@ def fixture_add_additional_log_patterns(self, fixture_dtest_setup):
)

def _base_bootstrap_test(self, bootstrap=None, bootstrap_from_version=None,
enable_ssl=None):
enable_ssl=None, compatibility_flag_on=False):
def default_bootstrap(cluster, token):
node2 = new_node(cluster)
node2.set_configuration_options(values={'initial_token': token})
node2.start(wait_for_binary_proto=True)
extra_jvm_args=None
if bootstrap_from_version and compatibility_flag_on:
extra_jvm_args = ["-Dcassandra.force_3_0_protocol_version=true"]

node2.start(jvm_args=extra_jvm_args, wait_for_binary_proto=True)

return node2

if bootstrap is None:
Expand Down Expand Up @@ -112,7 +117,6 @@ def default_bootstrap(cluster, token):
size1 = float(node1.data_size())
size2 = float(node2.data_size())
assert_almost_equal(size1, size2, error=0.3)
assert_almost_equal(float(initial_size - empty_size), 2 * (size1 - float(empty_size)))

assert_bootstrap_state(self, node2, 'COMPLETED')

Expand Down
2 changes: 1 addition & 1 deletion upgrade_tests/bootstrap_upgrade_test.py
Expand Up @@ -17,4 +17,4 @@ class TestBootstrapUpgrade(TestBootstrap):
@pytest.mark.no_vnodes
@since('3.10', max_version='3.99')
def test_simple_bootstrap_mixed_versions(self):
self._base_bootstrap_test(bootstrap_from_version="3.5")
self._base_bootstrap_test(bootstrap_from_version="3.5", compatibility_flag_on=True)

0 comments on commit adcc84d

Please sign in to comment.