Skip to content

Commit

Permalink
fix sender shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
raubitsj committed Jan 11, 2021
1 parent fe3a5dc commit 85dc8c8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,15 @@ def stop_backend(
mocked_run, hm, sm, sender, start_handle_thread, start_send_thread,
):
def stop_backend_func():
sender.communicate_exit(0, timeout=5)
sender.publish_exit(0)
for _ in range(10):
ret = sender.communicate_poll_exit()
assert ret, "poll exit timedout"
done = ret.response.poll_exit_response.done
if done:
break
time.sleep(1)
assert done, "backend didnt shutdown"

yield stop_backend_func

Expand Down

0 comments on commit 85dc8c8

Please sign in to comment.