Repository navigation
Retry page loads and API calls that time out on the slow demo site - #9
Merged
Merged
Conversation
practice.expandtesting.com sometimes takes longer than the timeout to answer, which failed whole batches of UI and hybrid tests at setup (page.goto and register timeouts). - framework/retry.py: with_retries, retries only timeouts / lost connections, with backoff - page loads get their own 30 s timeout and are retried (framework/pages/navigation.py) - the API client repeats only calls that are safe to repeat: GET, PUT, PATCH, DELETE, login - fixtures retry a timed-out registration with a new user, never the same email - NOTES_UI_NAVIGATION_TIMEOUT_MS and NOTES_ATTEMPTS settings, documented in the README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The UI jobs timed out even with retries while API (-n 4) and three browser jobs (-n 3 each) hit the shared demo site together: 13 sessions. API_WORKERS and UI_WORKERS (2 each) and max-parallel: 1 on the browser matrix keep it to 4, documented in the README. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With retries and lower CI load, the remaining UI failures were steps inside tests: a saved note's card or the progress text taking over 15 s (wait_for) or 5 s (expect) on the slow demo site. Those steps are not retried (that could hide bugs or duplicate a note); they get a longer wait instead: NOTES_UI_SERVER_TIMEOUT_MS (30000) for the NotesPage waits on the server and as the default of expect(). A wrong result still fails, only later. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The nightly run failed three times in a row (Nov 18–19), every time because
practice.expandtesting.comwas slow, not because a test found a bug:Page.goto: Timeout 15000ms exceededReadTimeouton the API, mostlyregisterwhile a fixture was setting up a test userWhat changes
framework/retry.py:with_retries()retries only timeouts and lost connections, waiting 2 s, then 4 s. A wrong answer (a 400, a wrong body, a missing element) still fails at once, and every retry is logged in the report.framework/pages/navigation.py):open_page()gives navigation its own 30 s timeout. It retries the load together with the page's own "ready" wait, so a page that arrived but never finished loading its list gets reloaded too. Reloading never changes app data.create_notewould make two notes).logoutis sent once too, because a repeated logout gets 401.accountandsecond_accountfixtures now share this one helper.NOTES_UI_NAVIGATION_TIMEOUT_MS(30000) andNOTES_ATTEMPTS(3;1turns retrying off), documented in the README.Verified
ruff checkandruff format --checkpass.create_noteandlogoutonce; any other error is raised at once.-n 3), 3 tests failed on a 5 sexpectwhile the site was slow; all 3 pass when run again. Retrying checks that failed is deliberately left out, because it would hide real bugs.🤖 Generated with Claude Code