You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(relay): stabilize admission diagnostics under delayed lifecycle callbacks #292
After PR #291 merged, main CI 37892897777 failed in optional relay (macos-latest, python 3.13) and consequently in the release gate. ReceiverAdmission.test_saturation_counters_and_diagnostics_are_bounded_and_sanitized expected one warning but captured two.
The test starts a background Relay listener in setup. Server waitingRooms == 1 is not a barrier for completion of the client's websocket_open callback. Admission and unrelated lifecycle events use the same logger. The test enables diagnostics before joining that listener, so a delayed lifecycle callback can enter its warning-count assertion.
A local controlled scheduling reproduction delays a real owned WebSocket handshake callback until the test's asynchronous close. The unchanged test fails with 2 != 1; captured event kinds are receiver_admission and websocket_open. This proves a matching contamination path, not the identity of the original CI's second record, which the failure output does not include.
Proposed correction
Cancel and join the background listener, with a bounded timeout, before this counter/log arithmetic test enables diagnostics.
Retain the exact one-warning assertion, counter totals, sanitized event schema, absence of secret text, minute-boundary assertions and empty-resource checks.
Add a deterministic delayed-observer regression that fails without the cancellation/join barrier.
Activity