aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/tests/test_indexer.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-node/tests/test_indexer.py')
-rw-r--r--packages/meshbay-node/tests/test_indexer.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/meshbay-node/tests/test_indexer.py b/packages/meshbay-node/tests/test_indexer.py
index fda40c8..5540be8 100644
--- a/packages/meshbay-node/tests/test_indexer.py
+++ b/packages/meshbay-node/tests/test_indexer.py
@@ -418,7 +418,14 @@ async def test_realtime_watchdog_add_reports_progress_like_a_bulk_scan(tmp_path,
assert indexer.progress.total_bytes == total_size
assert indexer.progress.scanned_bytes == 0
- await asyncio.sleep(0.05) # past debounce_secs; lets all three fire and finish
+ # Past debounce_secs, until all three have fired and finished. Not a fixed
+ # 50 ms: a Windows timer ticks every 15.6 ms, the debounce alone can take
+ # two of them, and the test failed one run in five there on a count of
+ # milliseconds that says nothing about the indexer.
+ for _ in range(200):
+ if not indexer.progress.scanning:
+ break
+ await asyncio.sleep(0.01)
assert indexer.progress.scanning is False, "must end idle, not stuck scanning"
assert indexer.progress.scanned_bytes == total_size