refactor: improve test determinism by removing time.sleep

Replaced non-deterministic `time.sleep` calls with active polling loops or
thread joins in `src/tests/` to improve test determinism and reliability.
Modified `test_unlock_sync.py`, `test_nostr_sdk_workflow.py`,
`test_background_relay_check.py`, `test_offline_mode_behavior.py`, and
`test_nostr_index_size.py`.
Generated integrity and audit reports in `reports/test-audit/`.
Completed the scheduler rotation by publishing completion logic and
task log file to `torch/task-logs/daily/`.

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-03-01 02:59:43 +00:00
1 parent 1febbd4b2c
commit e1400f32a5
9 files changed
+96 -21

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ def test_unlock_triggers_sync(monkeypatch, tmp_path):
pm.unlock_vault("pw")
pm.start_background_sync()
time.sleep(0.05)
pm._sync_task.join(timeout=1.0)
pm.cleanup()
assert called["sync"]