Skip to content
Open
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
36 changes: 18 additions & 18 deletions tests/test_timing_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down