Fix duplicate ttl overflow policy tests
Patch by Adam Holmberg, reviewed by paulo and brandonwilliams for
CASSANDRA-16145
diff --git a/cdc_test.py b/cdc_test.py
index 53ae0b9..df21f7d 100644
--- a/cdc_test.py
+++ b/cdc_test.py
@@ -474,8 +474,8 @@
while _get_commitlog_files(node.get_path()) <= pre_non_cdc_write_segments:
elapsed = time.time() - start
rate_limited_debug(' non-cdc load step has lasted {s:.2f}s'.format(s=elapsed))
- assert (elapsed <= time_limit, "It's been over a {s}s and we haven't written a new "
- "commitlog segment. Something is wrong.".format(s=time_limit))
+ assert elapsed <= time_limit, "It's been over a {s}s and we haven't written a new " \
+ "commitlog segment. Something is wrong.".format(s=time_limit)
execute_concurrent(
session,
((non_cdc_prepared_insert, ()) for _ in range(1000)),
diff --git a/ttl_test.py b/ttl_test.py
index 40c2963..e0168ab 100644
--- a/ttl_test.py
+++ b/ttl_test.py
@@ -344,7 +344,7 @@
@since('2.1')
def test_expiration_overflow_policy_cap_default_ttl(self):
- self._base_expiration_overflow_policy_test(default_ttl=False, policy='CAP')
+ self._base_expiration_overflow_policy_test(default_ttl=True, policy='CAP')
@since('3.0')
def test_expiration_overflow_policy_capnowarn(self):
@@ -352,7 +352,7 @@
@since('3.0')
def test_expiration_overflow_policy_capnowarn_default_ttl(self):
- self._base_expiration_overflow_policy_test(default_ttl=False, policy='CAP_NOWARN')
+ self._base_expiration_overflow_policy_test(default_ttl=True, policy='CAP_NOWARN')
@since('2.1')
def test_expiration_overflow_policy_reject(self):
@@ -360,7 +360,7 @@
@since('2.1')
def test_expiration_overflow_policy_reject_default_ttl(self):
- self._base_expiration_overflow_policy_test(default_ttl=False, policy='REJECT')
+ self._base_expiration_overflow_policy_test(default_ttl=True, policy='REJECT')
def _base_expiration_overflow_policy_test(self, default_ttl, policy):
"""