Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed Feb 27, 2024
1 parent 2b0b463 commit 7db2c8b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion distributed/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5196,7 +5196,10 @@ def test_quiet_client_close(loop):
threads_per_worker=4,
) as c:
futures = c.map(slowinc, range(1000), delay=0.01)
sleep(0.2) # stop part-way
# Stop part-way
s = c.cluster.scheduler
while sum(ts.state == "memory" for ts in s.tasks.values()) < 20:
sleep(0.01)
sleep(0.1) # let things settle

out = logger.getvalue()
Expand Down
2 changes: 2 additions & 0 deletions distributed/tests/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3008,11 +3008,13 @@ async def test_log_remove_worker(c, s, a, b):

assert log.getvalue().splitlines() == [
# Successful graceful
f"Retire worker addresses ['{a.address}']",
f"Retiring worker '{a.address}' (stimulus_id='graceful')",
f"Remove worker <WorkerState '{a.address}', name: 0, status: "
"closing_gracefully, memory: 2, processing: 1> (stimulus_id='graceful')",
f"Retired worker '{a.address}' (stimulus_id='graceful')",
# Aborted graceful
f"Retire worker addresses ['{b.address}']",
f"Retiring worker '{b.address}' (stimulus_id='graceful_abort')",
f"Could not retire worker '{b.address}': unique data could not be "
"moved to any other worker (stimulus_id='graceful_abort')",
Expand Down

0 comments on commit 7db2c8b

Please sign in to comment.