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

Aperta
#446 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
57/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, playwright
Ambito
testing

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
JavaScript
Stelle
3
Fork
18
Merge medio
1g 15h
PR unite (30g)
27

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ReduxISU/Redux_GUI

Tutte le issue di ReduxISU/Redux_GUI

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.