Skip to content

Commit 5c25c88

Browse files
authored
gh-126112: Fix test_os.TimerfdTests: use 10 ms resolution (#135681)
Use 10 ms for CLOCK_RES instead of 100 ms to tolerate slow buildbots.
1 parent 7a20c72 commit 5c25c88

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Lib/test/test_os.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import locale
1414
import os
1515
import pickle
16-
import platform
1716
import select
1817
import selectors
1918
import shutil
@@ -4291,13 +4290,8 @@ def test_eventfd_select(self):
42914290
@unittest.skipIf(sys.platform == "android", "gh-124873: Test is flaky on Android")
42924291
@support.requires_linux_version(2, 6, 30)
42934292
class TimerfdTests(unittest.TestCase):
4294-
# 1 ms accuracy is reliably achievable on every platform except Android
4295-
# emulators, where we allow 10 ms (gh-108277).
4296-
if sys.platform == "android" and platform.android_ver().is_emulator:
4297-
CLOCK_RES_PLACES = 2
4298-
else:
4299-
CLOCK_RES_PLACES = 3
4300-
4293+
# gh-126112: Use 10 ms to tolerate slow buildbots
4294+
CLOCK_RES_PLACES = 2 # 10 ms
43014295
CLOCK_RES = 10 ** -CLOCK_RES_PLACES
43024296
CLOCK_RES_NS = 10 ** (9 - CLOCK_RES_PLACES)
43034297

0 commit comments

Comments
 (0)