Skip to content
Permalink
Browse files
Fix flaky test_ttl_deletions
patch authored by Berenguer Blasi; reviewed by Ekaterina Dimitrova and Andres de la Pena for CASSANDRA-16530
  • Loading branch information
bereng authored and ekaterinadimitrova2 committed Mar 24, 2021
1 parent f5e32c7 commit 49f46fce94c8f25f32e9b778ded8b14c30ad851e
Showing 1 changed file with 5 additions and 4 deletions.
@@ -3189,7 +3189,7 @@ def check_all_paging_results(self, expected_data, pagecount, num_page_results):
range(0, len(expected_data), page_size)]

pf = self.get_page_fetcher()
pf.request_all()
pf.request_all(timeout=60)
assert pf.pagecount() == pagecount
assert pf.num_results_all() == num_page_results

@@ -3404,17 +3404,18 @@ def test_ttl_deletions(self):
data = self.setup_data()

# Set TTL to all row
ttl_seconds = 15
for row in data:
s = ("insert into paging_test (id, mytext, col1, col2, col3) "
"values ({}, '{}', {}, {}, {}) using ttl 3;").format(
"values ({}, '{}', {}, {}, {}) using ttl {};").format(
row['id'], row['mytext'], row['col1'],
row['col2'], row['col3'])
row['col2'], row['col3'], ttl_seconds)
self.session.execute(
SimpleStatement(s, consistency_level=CL.ALL)
)
self.check_all_paging_results(data, 8,
[25, 25, 25, 25, 25, 25, 25, 25])
time.sleep(5)
time.sleep(ttl_seconds)
self.check_all_paging_results([], 0, [])

def test_failure_threshold_deletions(self):

0 comments on commit 49f46fc

Please sign in to comment.