diff --git a/tests/test_timing_issues.py b/tests/test_timing_issues.py index bf44860..dfbd49d 100644 --- a/tests/test_timing_issues.py +++ b/tests/test_timing_issues.py @@ -182,24 +182,24 @@ def test_multiple_operations_timing(self): # Worst case: 5 * 30ms = 150ms assert total_time < 0.1, f"Operations took {total_time:.3f}s total" - def test_timeout_handling(self): - """ - Test that operations timeout correctly. - FLAKY: Sleep duration affects whether timeout triggers. - """ - operation_time = random.uniform(0.08, 0.12) - timeout = 0.1 - - start = time.time() - time.sleep(operation_time) - elapsed = time.time() - start - - # Check if we "timed out" - timed_out = elapsed >= timeout - - # This test doesn't make sense as written - - # it's checking random behavior deterministically - assert not timed_out, f"Operation timed out after {elapsed:.3f}s" +def test_timeout_handling(self): + """ + Test that operations timeout correctly. + FLAKY: Sleep duration affects whether timeout triggers. + """ + operation_time = random.uniform(0.08, 0.12) + timeout = 0.15 # Increased timeout to ensure it covers the max operation time + + start = time.time() + time.sleep(operation_time) + elapsed = time.time() - start + + # Check if we "timed out" + timed_out = elapsed >= timeout + + # This test doesn't make sense as written - + # it's checking random behavior deterministically + assert not timed_out, f"Operation timed out after {elapsed:.3f}s" class TestRequestCounting: