From 40c9d1370c260114592a0e72353d444fb809d30c Mon Sep 17 00:00:00 2001 From: Alexander Schwartzman Date: Wed, 14 Oct 2026 11:17:51 -0400 Subject: [PATCH] test(store): read the start time before the index build's release timer starts --- tst/unit/store/mongo_document_store_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tst/unit/store/mongo_document_store_test.py b/tst/unit/store/mongo_document_store_test.py index f6165587..a653b24e 100644 --- a/tst/unit/store/mongo_document_store_test.py +++ b/tst/unit/store/mongo_document_store_test.py @@ -130,8 +130,8 @@ def test_a_slow_build_is_left_to_finish_without_the_caller(short_wait, caplog): def test_a_unique_index_is_awaited_however_long_it_builds(short_wait): coll = _Indexing() - threading.Timer(0.3, coll.release.set).start() started = time.monotonic() + threading.Timer(0.3, coll.release.set).start() MongoDocumentStore({"c": coll}).ensure_index("c", ["instance_id"], unique=True) assert time.monotonic() - started >= 0.3 assert coll.built == ["instance_id_unique"]