Skip to content

Commit b7e8933

Browse files
committed
Added TTL feature flag
1 parent 99e0c92 commit b7e8933

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ttl_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,8 @@ def _base_expiration_overflow_policy_test(self, default_ttl, policy):
370370
@jira_ticket CASSANDRA-14092 and CASSANDRA-14227
371371
"""
372372
# Post 5.0 TTL may overflow in 2038 (legacy) or 2106 C14227
373-
overflow_policy_applies = self.cluster.version() < '5.0' or datetime.date.today().year >= 2086
373+
overflow_policy_applies = "EXTENDED_TTL_2106" != os.getenv("cassandra.use_oa_sstable_format", "LEGACY_TTL_2038")\
374+
or datetime.date.today().year >= 2086
374375
MAX_TTL = 20 * 365 * 24 * 60 * 60 # 20 years in seconds
375376
default_time_to_live = MAX_TTL if default_ttl else None
376377
self.prepare(default_time_to_live=default_time_to_live)

0 commit comments

Comments
 (0)