Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions test/asynchronous/test_client_backpressure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread
NoahStapp marked this conversation as resolved.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we only set the different timings in this scenario, to align with the spec otherwise?

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)


Expand Down
5 changes: 3 additions & 2 deletions test/test_client_backpressure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread
NoahStapp marked this conversation as resolved.
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)


Expand Down
Loading