test(cypress): give server round trips room in the specs that wait on them - #866
Open
joewiz wants to merge 1 commit into
Open
test(cypress): give server round trips room in the specs that wait on them#866joewiz wants to merge 1 commit into
joewiz wants to merge 1 commit into
Conversation
… them Several assertions wait on a server round trip while using Cypress's 4s default (or a hand-set 5s). That is comfortable against a warm instance and tight on a loaded runner or a cold container, so the specs fail intermittently and the failures are hard to tell apart from real regressions — which is much of what made the reports in eXist-db#821 hard to act on. Three sightings, each passing on an immediate re-run: autocomplete's completion popup for "repo" (eXist-db#865's first CI run, and also in eXist-db#821's tables), apply_configuration's first save against a freshly started container, and websocket_spec's diagnostics push. Raise the timeout only where the assertion is waiting on the server: 10s for the completion popup, the save dialog opening and closing, the save toasts and the path label; 15s for the WebSocket diagnostics assertion, which waits for a compile request and then a push back over the socket. Assertions that wait only on local DOM work keep their existing values. Verified on the stack the eXist-db image bundles (7.0.0-SNAPSHOT, existdb-openapi 0.10.0, Roaster 1.12.2): 261 tests, the three specs above green, and the only failure is query_error_structured, which eXist-db#840 fixes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 19, 2026
duncdrum
reviewed
Aug 19, 2026
duncdrum
left a comment
Contributor
There was a problem hiding this comment.
There are two leaner option:
- adjust the default timeouts in cypress config, instead of per testcase
- configure retries in cypress configs (this works really well in my experience) to get rid of more flake
The third option (most work but best results):
Where possible make longer chains using cy.request with assertions on outgoing and request and incoming responses, where each one starts a new timeout window, and failures become much more informative
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.
[This PR was prompted by Joe, drafted by Claude Code, and reviewed by Joe.]
Problem
Several assertions wait on a server round trip while using Cypress's 4-second default (or a hand-set 5 seconds). That is comfortable on a warm instance and tight on a loaded CI runner or a freshly started container, so these specs fail intermittently and are then hard to distinguish from real regressions — which is exactly what made the reports in #821 so hard to act on.
Three sightings, all of which passed on an immediate re-run:
autocomplete_spec.cm-tooltip-autocompleteafter "shows repo: completions when typing repo without colon"apply_configurationwebsocket_specThe autocomplete one also appears in the failure tables reported in #821.
Change
Raise the timeout only on assertions that are waiting on the server, and say so in a comment where it is not obvious:
websocket_spec's diagnostics assertion, which waits for a compile request and a push back over the socketAssertions that only wait on local DOM work are left at their existing values; this is not a blanket bump.
Verification
Full suite on the stack the eXist-db image bundles (eXist-db 7.0.0-SNAPSHOT, existdb-openapi 0.10.0, Roaster 1.12.2), clean container: the three specs above pass, and the suite is otherwise unchanged from
develop.