Skip to content

Commit 4c03fa2

Browse files
dbrattliclaude
andcommitted
test: widen tolerance in test_currentthread_now to fix flake
The test reads the wall clock twice with construction in between and asserts the gap is under 5ms. Under pytest-xdist on a shared CI VM, GC pauses or scheduler jitter routinely push that gap past 5ms (observed 14ms in CI). 50ms still proves the scheduler is not clearly broken without flaking on routine load. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 56f1103 commit 4c03fa2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/test_scheduler/test_currentthreadscheduler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class MyScheduler(CurrentThreadScheduler):
5151
def test_currentthread_now(self):
5252
scheduler = CurrentThreadScheduler()
5353
diff = scheduler.now - default_now()
54-
assert abs(diff) < timedelta(milliseconds=5)
54+
assert abs(diff) < timedelta(milliseconds=50)
5555

5656
def test_currentthread_now_units(self):
5757
scheduler = CurrentThreadScheduler()

0 commit comments

Comments
 (0)