From 97c2687ebbc4bfa1a43df91af9a278d5cd375cb5 Mon Sep 17 00:00:00 2001 From: Jer Miller Date: Wed, 29 Jul 2026 21:18:33 -0600 Subject: [PATCH] test(link): widen the stability-threshold test margin The session-below-threshold test measured lifetime from adoption, so it also absorbed the handoff to the test thread and a synchronous request before the close was scheduled, leaving too little slack for a loaded runner and risking a spurious stable reading. Scale the threshold and the hold together so the ratio the test depends on is unchanged while the absolute margin grows. Co-Authored-By: Claude Opus 5 (1M context) --- tests/link/test_dialer_unit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/link/test_dialer_unit.py b/tests/link/test_dialer_unit.py index 1dd00cb75..057b8a437 100644 --- a/tests/link/test_dialer_unit.py +++ b/tests/link/test_dialer_unit.py @@ -427,7 +427,7 @@ def test_short_session_below_stability_threshold_keeps_backing_off(monkeypatch) client = _managed_client( reconnect_initial_backoff=0.005, reconnect_max_backoff=0.04, - session_stable_after=0.06, + session_stable_after=0.6, ) records, observed = _spy_lifecycle_failures(client, after=2) try: @@ -439,7 +439,7 @@ def test_short_session_below_stability_threshold_keeps_backing_off(monkeypatch) b"ok", ) # This scaled hold is on the short-lived side of the stability threshold. - client._run(_finish_session_after(held[0], 0.035)) + client._run(_finish_session_after(held[0], 0.35)) assert observed.wait(timeout=1) finally: client.close() -- 2.51.2