Skip to content

feat(test-runner): support read and read-write lock modes - #42619

Closed
Pavel Feldman (pavelfeldman) wants to merge 1 commit into
microsoft:mainfrom
pavelfeldman:fix-42594
Closed

Pavel Feldman (pavelfeldman) wants to merge 1 commit into
microsoft:mainfrom
pavelfeldman:fix-42594

Conversation

@pavelfeldman

Copy link
Copy Markdown
Member

Summary

  • lock accepts { name, mode } where mode is 'read' or 'read-write' (default); plain strings stay 'read-write'.
  • Any number of 'read' holders run together, a 'read-write' holder runs alone. Read locks are not granted ahead of a queued 'read-write' job waiting for the same lock, so writers are not starved.
  • A file group holds a lock in 'read-write' mode when any of its tests needs it.
  • oneOf schema errors prefer the variant whose type matched, so a bad mode is reported instead of a generic type mismatch.

Fixes #42594

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

6 flaky ⚠️ [chromium-library] › library/video.spec.ts:664 › screencast › should capture full viewport `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/beforeunload.spec.ts:130 › should support dismissing the dialog multiple times `@chromium-ubuntu-22.04-node24`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:257 › third party 'Partitioned;' cookies `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:470 › top level 'Partitioned;' cookie and same origin iframe `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-page] › page/page-emulate-media.spec.ts:144 › should keep reduced motion and color emulation after reload `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-page] › page/page-event-request.spec.ts:181 › should return response body when Cross-Origin-Opener-Policy is set `@firefox-ubuntu-22.04-node20`

50120 passed, 1235 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [firefox] › mcp/annotate.spec.ts:446 › should switch screencast to -s session on show --annotate @mcp-windows-latest-firefox

7735 passed, 1228 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I took a look at the failing CI here.

🟢 Nothing here looks caused by this PR

The one real failure — mcp/annotate.spec.ts:446 on Windows Firefox — is a long-standing flake on unrelated SHAs, and this PR only touches test-runner lock modes, which the MCP annotate flow doesn't exercise. The other 6 red squares in "tests 1" all passed on retry.

Details

This PR is scoped to the read/read-write lock feature (dispatcher.ts, testGroups.ts, test.ts, validators.ts, jsonSchema.ts, the test-locks / json-schema specs, and docs/types). None of it reaches MCP, screencast, or the annotate tooling.

Pre-existing flake / infra

Triaged by the Playwright bot - agent run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add shared/exclusive modes for test locks

1 participant