test: stabilize async remote mutation tests - #16896
Conversation
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/a4252909c77a1117b01a588c653a6919f3fcbca2Open in Note This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed. |
|
|
@svelte-triage-bot how equivalent are these tests? and why was it flaky in the first place? it's using the |
|
They are not fully equivalent. The new test is better aligned with the stated behavior, but it drops one assertion.
The flake was not session-state interference. The race is within that same session:
The action response does not await steps 3–4. Thus the failed traces could already show the new One caveat in the replacement: I would add await expect(page.locator('#finite-done')).toHaveText('true');before installing the request listener. |
Fixes two pre-existing async e2e flakes exposed by the CI run for #16892.
The form reconnect test previously polled a server-side iterator cleanup counter. The failed traces show that the form response succeeded and the targeted
get_countconnection restarted, but transport cleanup had not updated the counter within the assertion window. Assert the observable reconnect requests directly instead, including thatget_finite_countis not reconnected.The serial batch tests also retained module-level todo mutations across retries. Reset the todos before asserting the baseline state so reruns are idempotent.
Failed workflow: https://github.com/sveltejs/kit/actions/runs/32541364509
Verification:
pnpm -F test-async check