Skip to content

Commit

Permalink
Fixing a flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
john-westcott-iv authored and mabashian committed Sep 25, 2024
1 parent e8356c8 commit 71b0aa1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test_app/tests/lib/cache/test_fallback_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ def test_fallback_cache():
# Check until primary is back
timeout = time.time() + 30
while True:
if cache.get_active_cache() == PRIMARY_CACHE:
# Tell the cache to get a key, this should cause it to check the primary cache
cache.get("key")
active_cache = cache.get_active_cache()
if active_cache == PRIMARY_CACHE:
break
if time.time() > timeout:
assert False
Expand Down

0 comments on commit 71b0aa1

Please sign in to comment.