Skip to content

Commit 477f6b6

Browse files
committed
tests: harden transient-connectivity retries for post-restart queries
- has_needed_replication_slots(): bump retry_timeout 5s -> 15s, the existing 0.5s-backoff retry loop wasn't always covering a keeper- triggered Postgres restart under a loaded CI runner (test_multi_ifdown.py::test_003_add_standby saw a bare Connection refused). - test_citus_multi_standbys.py: use the existing run_sql_query_retry() helper for worker2c instead of a bare run_sql_query(), which had no retry at all (test_003_002_all_workers_have_data saw the same).
1 parent 22be0f4 commit 477f6b6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎tests/pgautofailover_utils.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1829,7 +1829,7 @@ def list_replication_slot_names(self):
18291829
self.print_debug_logs()
18301830
raise e
18311831

1832-
def has_needed_replication_slots(self, retry_timeout=5):
1832+
def has_needed_replication_slots(self, retry_timeout=15):
18331833
"""
18341834
Each node is expected to maintain a slot for each of the other nodes
18351835
the primary through streaming replication, the secondary(s) manually

‎tests/test_citus_multi_standbys.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def test_003_002_all_workers_have_data():
192192
results = worker2b.run_sql_query(q1)
193193
eq_(results, r2)
194194

195-
results = worker2c.run_sql_query(q1)
195+
results = worker2c.run_sql_query_retry(q1)
196196
eq_(results, r2)
197197

198198

0 commit comments

Comments
 (0)