Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Increase timeout to almost guarantee 2 PUG cycles to eliminate random test failures #6560

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions py/server/tests/test_table_data_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ def test_partition_sub_failure(self):
backend.sub_new_partition_fail_test = True
table = data_service.make_table(TableKeyImpl("test"), refreshing=True)
with self.assertRaises(Exception) as cm:
# failure_cb will be called in the background thread after 2 PUG cycles
self.wait_ticking_table_update(table, 600, 2)
# failure_cb will be called in the background thread after 2 PUG cycles, 3 seconds timeout should be enough
self.wait_ticking_table_update(table, 600, 3)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the machine is loaded should we really say only 3 seconds? What do we have to lose by making the value higher? Will a higher value actually make a successful test take longer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A higher number does make the test take longer b/c the awaitUpdate method called underneath won't error out due to the table being in a failed state, so we'll exhaust the timeout.

self.assertTrue(table.j_table.isFailed())

def test_partition_size_sub_failure(self):
Expand All @@ -358,8 +358,8 @@ def test_partition_size_sub_failure(self):
backend.sub_partition_size_fail_test = True
table = data_service.make_table(TableKeyImpl("test"), refreshing=True)
with self.assertRaises(Exception) as cm:
# failure_cb will be called in the background thread after 2 PUG cycles
self.wait_ticking_table_update(table, 600, 2)
# failure_cb will be called in the background thread after 2 PUG cycles, 3 seconds timeout should be enough
self.wait_ticking_table_update(table, 600, 3)

self.assertTrue(table.j_table.isFailed())

Expand Down