Repository navigation
test(testing): run the e2e suite on two workers by default - #1892
Merged
joshunrau merged 1 commit intoNov 9, 2026
Merged
Conversation
Outside CI the suite ran on Playwright's default of half the cores. At five workers it logs in faster than the API's login throttle allows (50 a minute): from mail.spec.ts onwards tests fail with "Login failed (429)", and each failure restarts a worker that logs in again. That many workers also leave the machine little for anything else running. The default is now two workers, and still one on CI. E2E_WORKERS in .env overrides both, and anything but a positive integer fails while the config loads. Co-Authored-By: Claude Fable 5.2 <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.
Problem
Outside CI,
testing/playwright.config.tsleftworkersundefined, so Playwright used half the cores. That caused two problems:mail.spec.ts:257onwards tests fail withLogin failed … (429): ThrottlerException: Too Many Requests, and each failure restarts a worker that logs in again, so the failures cascade throughpassword-reset,permission-setsandremote-assignments. Three full runs failed at the same test.Change
CIis set.E2E_WORKERSin the root.envoverrides both.testing/src/support/env.tsreads it and throws while the config loads on anything but a positive integer..env.templatecarries the key blank, andtesting/AGENTS.md§Running documents the default, the reason and the override.testing-strategy.mdpoints there.One thing to know about the override: the
test:*scripts load.envthroughenv-cmd, whose values win over the shell. So once.envcarries the key, even blank, a shell export ofE2E_WORKERSis ignored. For a single run,--workers=<n>after the script still works.Verification
pnpm test:e2efrom the root, with no flags, passes in about 6 minutes. Before this change the same command failed on this machine in three of three runs.workersvalue, checked by loading the config under each combination: 2 with the key absent, 1 withCIset, 4 withE2E_WORKERS=4(also withCIset), 2 with a blank key and a shell export of 4, and a thrown error forabcand0.pnpm lintpasses andpnpm test:coverageis at 100%.Exceptions:
testing/has no unit tier, and the change is the suite's own configuration; the suite passing at the default is its test.Co-Authored-By: Claude Fable 5.2 noreply@anthropic.com