From 4e5ea132ffd76bba40b5113525a661ad5635d892 Mon Sep 17 00:00:00 2001 From: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com> Date: Mon, 7 Sep 2026 11:45:29 +0000 Subject: [PATCH] test: align all settings writer timeout oracles with clock resolution --- tests/test_settings_document_busy.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_settings_document_busy.py b/tests/test_settings_document_busy.py index 2ada5c1f2..81cef142e 100644 --- a/tests/test_settings_document_busy.py +++ b/tests/test_settings_document_busy.py @@ -133,7 +133,9 @@ def test_the_initiating_writer_returns_within_the_same_bound(monkeypatch): _run_settings_writer(wedged_writer, SimpleNamespace(), {}) ) elapsed = time.monotonic() - started - assert 2 * 0.2 <= elapsed < 5, elapsed # exactly the 2x bound, then the typed answer + # asyncio timers may fire up to one monotonic-clock resolution early. + resolution = time.get_clock_info("monotonic").resolution + assert 2 * 0.2 - resolution <= elapsed < 5, elapsed assert not finished.is_set(), "the response must not wait for the wedged body" release.set() assert finished.wait(10), "the abandoned body must still run to completion in its thread"