Skip to content

Commit

Permalink
Fix test_from_worker_address_error[unreachable] test
Browse files Browse the repository at this point in the history
The error raised may manifest in different ways depending on the
ordering and timing actions occur. An approach that seems to prevent
timing issues is to wait for the remote process to terminate entirely,
and not only depend on the `ucxx.reset()` call.
  • Loading branch information
pentschev committed Nov 15, 2024
1 parent f1d98f2 commit 4c6b975
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def _test_from_worker_address_error_client(q1, q2, error_type):
async def run():
# Receive worker address from server via multiprocessing.Queue
remote_address = ucxx.get_ucx_address_from_buffer(q1.get())
if error_type == "unreachable":
server_closed = q1.get()
assert server_closed == "Server closed"

if error_type == "unreachable":
with pytest.raises(
Expand Down Expand Up @@ -177,6 +180,10 @@ def test_from_worker_address_error(error_type):
)
client.start()

if error_type == "unreachable":
server.join()
q1.put("Server closed")

join_processes([client, server], timeout=30)
terminate_process(server)
try:
Expand Down

0 comments on commit 4c6b975

Please sign in to comment.