Skip to content

Commit fd430f8

Browse files
[3.14] gh-143528: Fix test_time.test_thread_time() (GH-143558) (#143559)
gh-143528: Fix test_time.test_thread_time() (GH-143558) Tolerate 100 ms instead of 20 ms to support slow CIs. (cherry picked from commit efaa56f) Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent de53bf4 commit fd430f8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Lib/test/test_time.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,11 +577,10 @@ def test_thread_time(self):
577577

578578
# thread_time() should not include time spend during a sleep
579579
start = time.thread_time()
580-
time.sleep(0.100)
580+
time.sleep(0.200)
581581
stop = time.thread_time()
582-
# use 20 ms because thread_time() has usually a resolution of 15 ms
583-
# on Windows
584-
self.assertLess(stop - start, 0.020)
582+
# gh-143528: use 100 ms to support slow CI
583+
self.assertLess(stop - start, 0.100)
585584

586585
info = time.get_clock_info('thread_time')
587586
self.assertTrue(info.monotonic)

0 commit comments

Comments
 (0)