Skip to content

Commit b368807

Browse files
committed
add a short sleep on test_max_age_zero
1 parent 366d1db commit b368807

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/test_call_with_freshness_threshold.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ def f(x):
100100

101101
f.clear_cache()
102102
v1 = f(1)
103+
# Add a small sleep to ensure measurable time difference on all platforms
104+
time.sleep(0.01)
103105
v2 = f(1, max_age=timedelta(seconds=0))
104106
assert v2 != v1 # Zero max_age always triggers recalc
105107

0 commit comments

Comments
 (0)