You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unit tests for with_retry in apple.py and play.py #19
Both store clients retry network calls with exponential backoff, so a dropped connection doesn't leave a screenshot set half-uploaded. The two versions behave differently, and neither is tested.
apple.with_retry retries any httpx.TransportError or httpx.HTTPStatusError, then raises AppleError after the last attempt.
play.with_retry retries httpx.TransportError, and retries PlayError only when the message contains " HTTP 5". Any other PlayError is raised on the first attempt.
What to do
Create tests/test_retry.py. Patch time.sleep so the tests run instantly, and use a small fake function that fails N times before succeeding.
Succeeds after a few transient failures, and returns the value.
Gives up after tentativas attempts (Apple wraps the error in AppleError, Play re-raises it).
Play: a 4xx PlayError is not retried, a 5xx one is.
The backoff waits 2, 4, 8... seconds (check the time.sleep calls).
Activity
CodeByPeace commentedon Oct 2, 2026
Hello
I'd like to take this one.
I'll add tests/test_retry.py covering both apple.with_retry and play.with_retry, with time.sleep patched.
CodeByPeace commentedon Oct 2, 2026
PR is up: #21. Happy to adjust anything.