Repository navigation
Build/Test Tools: Give each application passwords E2E test its own user. - #15902
adimoldovan wants to merge 1 commit into
Conversation
Each test used the admin user and revoked all of its application passwords. When two copies of the spec ran at the same time in the parallel project, each copy deleted the passwords of the other. See #66392.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the application-password test isolation changes.
No open issues 🎉
What changed in this PR
This PR isolates the application-password end-to-end tests so parallel runs no longer interfere with each other’s passwords.
Changes:
- Start each test logged out, create a dedicated subscriber with
userFactory, and sign in. - Query application passwords by the test user’s ID instead of
/users/me. - Rely on factory user cleanup instead of explicitly revoking passwords before and after each test.
| File | Description |
|---|---|
tests/e2e/specs/profile/applications-passwords.test.js |
Use per-test users and user-specific REST queries to isolate parallel runs. |
Review effort: Balanced
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
lancewillett
left a comment
There was a problem hiding this comment.
Verified the isolation benefit using the existing spec with two workers, --repeat-each=10 --retries=0, and a clean database before each run: baseline had 7 failures and 23 passes; this revision passed all 30 cases with the same assertions.
Baseline failures included another concurrent copy’s password remaining after revocation, and a newly created password disappearing before its REST assertion. Per-test users isolate those records; final cleanup left no test users or application-password metadata. All four E2E CI jobs also passed.
No blocking findings remain.
AI review · gpt-6
…E2E tests. Track and clean up each test's attachments, and run the Add New Media spec in parallel. Give each application-password test its own user. Developed in: #15896, #15902 Props adrianmoldovanwp. See #66392. git-svn-id: https://develop.svn.wordpress.org/trunk@65402 602fd350-edb4-49c9-b593-d223f7449a82
…E2E tests. Track and clean up each test's attachments, and run the Add New Media spec in parallel. Give each application-password test its own user. Developed in: WordPress/wordpress-develop#15896, WordPress/wordpress-develop#15902 Props adrianmoldovanwp. See #66392. Built from https://develop.svn.wordpress.org/trunk@65402 git-svn-id: http://core.svn.wordpress.org/trunk@64541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
|
PR #15902 landed in https://core.trac.wordpress.org/changeset/65402 |
Trac ticket: https://core.trac.wordpress.org/ticket/66392
applications-passwords.test.jsfailed in theparallelproject when two copies of it ran at the same time. Each test used the admin user and revoked all of its application passwords, so each copy saw and deleted the passwords of the other.Each test now starts logged out, creates its own subscriber with
userFactory, and signs in as that user. The REST checks read that user's passwords by ID, not through/users/me.userFactorydeletes the user, and so its passwords, when the test ends.Testing Instructions
npm run test:e2e -- --project=parallel tests/e2e/specs/profile/applications-passwords.test.js --repeat-each=10 --retries=0. All 30 tests pass.npm run test:e2e -- tests/e2e/specs/profile/applications-passwords.test.js. All 3 tests pass.Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Code change, test runs and this description.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.