From 7ef19f0619dbe2b4f58e66fa961f550eb4ac332e Mon Sep 17 00:00:00 2001 From: jenkins Date: Sat, 16 May 2026 17:57:28 -0300 Subject: [PATCH] test(atlasbot): make claim cleanup clock deterministic --- tests/test_support_modules.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_support_modules.py b/tests/test_support_modules.py index 22a28b6..0a322f4 100644 --- a/tests/test_support_modules.py +++ b/tests/test_support_modules.py @@ -430,6 +430,7 @@ def test_state_store_roundtrip_and_cleanup(tmp_path: Path, monkeypatch: pytest.M path = tmp_path / "state.db" store = ClaimStore(str(path), 60) + monkeypatch.setattr("atlasbot.state.store.time.monotonic", lambda: 1_000_000.0) store.set( "conv", { @@ -442,7 +443,7 @@ def test_state_store_roundtrip_and_cleanup(tmp_path: Path, monkeypatch: pytest.M assert payload and payload["snapshot_id"] == "snap-1" assert payload["claims"] == [{"id": "c1"}] assert _safe_json("{broken", []) == [] - monkeypatch.setattr("atlasbot.state.store.time.monotonic", lambda: 1_000_000.0) + monkeypatch.setattr("atlasbot.state.store.time.monotonic", lambda: 1_000_120.0) store.cleanup() assert store.get("conv") is None