fix(api): time the rate-limit window on the monotonic clock and make three flaky tests deterministic

This commit is contained in:
imSp4rky
2026-12-02 18:41:23 -07:00
parent e4940df438
commit d23324e27b
3 changed files with 14 additions and 5 deletions
@@ -239,6 +239,7 @@ def test_a_remote_session_runs_end_to_end_over_http(
) -> None:
"""A client that does not open the channel, or whose upgrade is refused or fails, polls with the same replies."""
caplog.set_level(logging.DEBUG)
monkeypatch.setattr(session_store.SessionStore, "_expired", lambda self, entry: False)
if channel == "none":
monkeypatch.setattr(WebSocketChannel, "open", lambda self, timeout=0: False)
if channel == "failed":