Skip to content

Commit 26cbfab

Browse files
committed
test: bump wait_for_sync timeout from 10s to 60s
The single Timer was shared across all 6 steps of wait_for_sync, so a slow RDB sync on GitHub Actions runners would consume the whole 10s budget and leave the trailing marker-key checks with effectively no time, causing flaky "marker key not deleted within 10s" failures.
1 parent 7413fb8 commit 26cbfab

5 files changed

Lines changed: 5 additions & 6 deletions

File tree

tests/cases/auth_acl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_acl():
3131
shake = h.Shake(opts)
3232

3333
# wait sync done
34-
shake.wait_for_sync(timeout=10)
34+
shake.wait_for_sync(timeout=60)
3535
pybbt.log(shake.get_status())
3636

3737
# check data

tests/cases/function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_filter_db():
2626
src.do("set", "key", "value")
2727

2828
# wait sync done (use db=1 because db=0 is filtered)
29-
shake.wait_for_sync(timeout=10, db=1)
29+
shake.wait_for_sync(timeout=60, db=1)
3030

3131
dst.do("select", 0)
3232
pybbt.ASSERT_EQ(dst.do("get", "key"), None)

tests/cases/function_library.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_function_library_sync_replace_existing():
5757
shake = h.Shake(opts)
5858

5959
try:
60-
shake.wait_for_sync(timeout=10)
60+
shake.wait_for_sync(timeout=60)
6161
except Exception as e:
6262
with open(f"{shake.dir}/data/shake.log") as f:
6363
pybbt.log(f.read())

tests/cases/sync.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ def _test_sync(src, dst):
1818
pybbt.log(f"opts: {opts}")
1919
shake = h.Shake(opts)
2020

21-
# Use longer timeout for cluster sync (cluster gossip and cross-node sync takes more time)
22-
sync_timeout = 30 if (src.is_cluster() or dst.is_cluster()) else 10
21+
sync_timeout = 60
2322

2423
# wait sync done
2524
try:

tests/helpers/shake.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def _wait_start(self, timeout=5):
135135
def is_consistent(self):
136136
return self.get_status()["consistent"]
137137

138-
def wait_for_sync(self, timeout: float = 5, db: int = 0):
138+
def wait_for_sync(self, timeout: float = 60, db: int = 0):
139139
"""
140140
Wait for data to be fully synced from src to dst.
141141

0 commit comments

Comments
 (0)