diff --git a/test/asynchronous/test_client_backpressure.py b/test/asynchronous/test_client_backpressure.py index b0cfb54b1e..eecb427c73 100644 --- a/test/asynchronous/test_client_backpressure.py +++ b/test/asynchronous/test_client_backpressure.py @@ -354,8 +354,9 @@ async def test_05_overload_errors_with_basebackoffms_override_backoff(self, rand # A run can never be faster than the sum of its backoffs. # With jitter pinned to 1, the default backoffs are 0.2 + 0.4 = 0.6s # and the baseBackoffMS=50 backoffs are 0.1 + 0.2 = 0.3s. - self.assertGreaterEqual(exponential_backoff_time, 0.6) - self.assertGreaterEqual(with_base_backoff_ms_time, 0.3) + # Allow for slight timing slack due to asyncio timing resolution on Windows <= Python 3.12 + self.assertGreaterEqual(exponential_backoff_time, 0.55) + self.assertGreaterEqual(with_base_backoff_ms_time, 0.25) self.assertLess(with_base_backoff_ms_time, 0.6) diff --git a/test/test_client_backpressure.py b/test/test_client_backpressure.py index fe510a93fb..20c7ffd093 100644 --- a/test/test_client_backpressure.py +++ b/test/test_client_backpressure.py @@ -352,8 +352,9 @@ def test_05_overload_errors_with_basebackoffms_override_backoff(self, random_fun # A run can never be faster than the sum of its backoffs. # With jitter pinned to 1, the default backoffs are 0.2 + 0.4 = 0.6s # and the baseBackoffMS=50 backoffs are 0.1 + 0.2 = 0.3s. - self.assertGreaterEqual(exponential_backoff_time, 0.6) - self.assertGreaterEqual(with_base_backoff_ms_time, 0.3) + # Allow for slight timing slack due to asyncio timing resolution on Windows <= Python 3.12 + self.assertGreaterEqual(exponential_backoff_time, 0.55) + self.assertGreaterEqual(with_base_backoff_ms_time, 0.25) self.assertLess(with_base_backoff_ms_time, 0.6)