e2e suite fails a random test now and then under parallel load

Open
#446 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
57/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript, playwright
Domain
testing

Research direction

Start by reading playwright.config.js to confirm the parallel worker and retry settings, then inspect the named waits in app.spec.js and visualization-switching.spec.js. Run the e2e suite against the same backend and next start setup described in the issue. Done when the chosen mitigation is implemented and the suite no longer fails the required CI check from these intermittent timeouts.

Written by the indexing model from the issue text.

Description

bug

The e2e suite sometimes fails one or two tests that have nothing to do with the change being tested. Each time it's a different test, and the test passes when run alone or on a rerun. Right now a flaky run fails the required build-test / ci check, so a good PR looks broken until someone reruns it.

What we saw (Nov 18)

Where Failed Passes alone / on rerun?
CI, #441 (driver.js bump) app.spec.js:135 (solver error), app.spec.js:273 (malformed certificate): the Solve/Verify panel stayed hidden for 15 s after clicking ▼ Yes. Rerun of the failed job went green with no change
Local full run, #441 branch visualization-switching.spec.js:136 (switching the reduction target) Yes
Local full run, #443 branch + fix app.spec.js:198 (3SAT → Clique reduced instance), toBeEnabled timed out Yes, 3 of 3 alone

All local runs used ghcr.io/reduxisu/redux:latest on :27000 and next build + next start, the same pairing as CI.

Likely cause

playwright.config.js has fullyParallel: true and retries: 0, with the default worker count. Every test talks to the same single backend, so when many run at once some requests (reductions, the 7 batch calls on page load) take longer than the 15 s expect timeout. Whichever test is unlucky fails.

Options

  1. Quick: set retries: process.env.CI ? 1 : 0. Playwright then reports a test that passes on retry as "flaky" instead of failing the run. This hides the race but stops it from blocking PRs.
  2. Cap workers in CI (for example workers: process.env.CI ? 2 : undefined) so the backend isn't flooded. The run gets slower.
  3. Real fix: find the waits that assume a fast backend (panel expansion right after load, reduce/solve buttons enabling) and make them wait for the request they depend on, the way #339's 60 s picture-timeout test now waits for Clique's /reduce to finish.

My suggestion: do 1 now so PRs stop going red at random, then 3 as the tests are touched. Leave the retry on so "flaky" results stay visible in the report.

Dominant language
JavaScript
Stars
3
Forks
18
Avg merge
1d 15h
Merged PRs (30d)
27

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ReduxISU/Redux_GUI

All issues in ReduxISU/Redux_GUI

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.