mirror of
https://github.com/vale981/ray
synced 2025-03-05 18:11:42 -05:00
[Doc] add comment for waiting for Ray to shutdown in test_client_reconnect.py
(#21672)
This commit is contained in:
parent
5893a9eddb
commit
ef9d9df4e7
1 changed files with 6 additions and 0 deletions
|
@ -268,6 +268,12 @@ def start_middleman_server(on_log_response=None,
|
|||
ray.util.disconnect()
|
||||
if middleman:
|
||||
middleman.stop(0)
|
||||
# Delete server to allow the client server to be GC'ed, which shuts
|
||||
# down Ray. Then wait for Ray to shut down in the local process.
|
||||
# Otherwise, the Ray cluster may stay alive until the next call to
|
||||
# start_middleman_server(), become the backing Ray cluster to the
|
||||
# client server, and shut down in the middle of the test case after
|
||||
# GC finally catches up, leading to test failures.
|
||||
server.stop(0)
|
||||
del server
|
||||
start = time.monotonic()
|
||||
|
|
Loading…
Add table
Reference in a new issue