increase max wait time a bit - some (systemd) tests may fail occasionally in fast mode

pull/4006/head
sebres 2025-04-24 00:11:45 +02:00
parent cbc3cb431c
commit 9ecf6150c8
2 changed files with 2 additions and 2 deletions

View File

@ -350,7 +350,7 @@ class TestsUtilsTest(LogCaptureTestCase):
unittest.F2B.fast = True
try:
self.assertEqual(unittest.F2B.maxWaitTime(lambda: 50)(), 50)
self.assertEqual(unittest.F2B.maxWaitTime(25), 5)
self.assertEqual(unittest.F2B.maxWaitTime(25), 10)
self.assertEqual(unittest.F2B.maxWaitTime(25.), 25.0)
finally:
unittest.F2B.fast = orgfast

View File

@ -219,7 +219,7 @@ class F2B(DefaultTestOptions):
# short only integer interval (avoid by conditional wait with callable, and dual
# wrapping in some routines, if it will be called twice):
if self.fast and isinstance(wtime, int):
wtime = float(wtime) / (10 if wtime < 10 else 5)
wtime = float(wtime) / 2.5
return wtime