Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion test/asynchronous/test_streaming_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,14 @@ def hb_failed(event):
"appName": "heartbeatEventAwaitedFlag",
},
}
# PYTHON-6002: PyPy's JIT warm-up can delay the heartbeat monitor
# thread past the default timeout on slow/throttled CI runners.
timeout = 30 if "PyPy" in sys.version else 10
async with self.fail_point(fail_heartbeat):
await async_wait_until(
lambda: hb_listener.matching(hb_failed), "published failed event"
lambda: hb_listener.matching(hb_failed),
"published failed event",
timeout=timeout,
)
# Reconnect.
await client.admin.command("ping")
Expand Down
9 changes: 8 additions & 1 deletion test/test_streaming_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,15 @@ def hb_failed(event):
"appName": "heartbeatEventAwaitedFlag",
},
}
# PYTHON-6002: PyPy's JIT warm-up can delay the heartbeat monitor
# thread past the default timeout on slow/throttled CI runners.
timeout = 30 if "PyPy" in sys.version else 10
with self.fail_point(fail_heartbeat):
wait_until(lambda: hb_listener.matching(hb_failed), "published failed event")
wait_until(
lambda: hb_listener.matching(hb_failed),
"published failed event",
timeout=timeout,
)
# Reconnect.
client.admin.command("ping")

Expand Down
Loading