Skip to content

Commit d830822

Browse files
committed
Stabilize flaky Windows regression tests
1 parent 3e37e04 commit d830822

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

distributed/tests/test_batched.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ async def send():
172172

173173
async def recv():
174174
while True:
175-
result = await wait_for(comm.read(), 1)
175+
result = await wait_for(comm.read(), 5)
176176
L.extend(result)
177177
if result[-1] == 9999:
178178
break

distributed/tests/test_scheduler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3642,6 +3642,7 @@ def print_memory_info(msg: str) -> None:
36423642
# as fast as on Linux. Note that this behaviour is heavily impacted by OS tweaks,
36433643
# meaning that what you observe on your local host may behave differently on CI.
36443644
if not LINUX:
3645+
await asyncio.gather(*(n.close() for n in nannies))
36453646
return
36463647

36473648
print_memory_info("Before clearing memory leak")

distributed/tests/test_worker.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3017,6 +3017,8 @@ async def test_log_remove_worker(c, s, a, b):
30173017
if "stimulus_id" in ev: # Strip timestamp
30183018
ev["stimulus_id"] = ev["stimulus_id"].rsplit("-", 1)[0]
30193019

3020+
worker_get_client_events = events.pop("worker-get-client")
3021+
30203022
assert events == {
30213023
a.address: [
30223024
{
@@ -3091,9 +3093,10 @@ async def test_log_remove_worker(c, s, a, b):
30913093
"worker": b.address,
30923094
},
30933095
],
3094-
"worker-get-client": [{"client": c.id, "timeout": 5, "worker": b.address}],
30953096
}
30963097

3098+
assert {"client": c.id, "timeout": 5, "worker": b.address} in worker_get_client_events
3099+
30973100

30983101
@gen_cluster(client=True)
30993102
async def test_task_flight_compute_oserror(c, s, a, b):

0 commit comments

Comments
 (0)