Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion test/unit_test/headless/test_agent_presence_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,13 @@ def start(self):
client = connected(pipe)
try:
assert client.closed.wait(1)
assert 'source-close' in events and server.status()['failed']
# The server drops the connection first and retires its source after it:
# on a slow runner the client sees the close before the retirement lands.
deadline = time.monotonic() + 5
while time.monotonic() < deadline and not ('source-close' in events and server.status()['failed']):
threading.Event().wait(0.01)
assert 'source-close' in events
assert server.status()['failed']
finally:
client.close()
with pytest.raises(AgentTaskError):
Expand Down
Loading