Skip to content

feat(test-runner): support locks in test.describe.configure - #42792

Merged
Devin Rousso (dcrousso) merged 1 commit into
microsoft:mainfrom
dcrousso:fix-42782
Sep 21, 2026
Merged

Devin Rousso (dcrousso) merged 1 commit into
microsoft:mainfrom
dcrousso:fix-42782

Conversation

@dcrousso

Copy link
Copy Markdown
Contributor

locks cannot be declared imperatively for the enclosing suite

add a lock option to test.describe.configure that accumulates suite locks

fixes #42782

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect 0 (edit) to 1 test tops for this change.

locks cannot be declared imperatively for the enclosing suite

add a `lock` option to `test.describe.configure` that accumulates suite locks
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

5 flaky ⚠️ [chromium-library] › library/beforeunload.spec.ts:130 › should support dismissing the dialog multiple times `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/chromium/oopif.spec.ts:311 › should click `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/video.spec.ts:762 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node20`
⚠️ [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`

52020 passed, 1250 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [chromium] › mcp/idle-timeout.spec.ts:61 › cdp endpoint only disconnects on idle and reconnects to the same pages @mcp-ubuntu-latest-chromium

8691 passed, 1474 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

🟡 One MCP failure I can't pin either way — but the diff can't reach it

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

The only failure is [chromium] › mcp/idle-timeout.spec.ts:61 on the Ubuntu MCP bot (run 35629239480). This PR only adds a lock option to test.describe.configure, which the MCP CDP-idle path doesn't touch — but I couldn't find this exact test failing anywhere else, so I'm calling it uncertain rather than a confirmed flake. A rerun of that bot should settle it.

Details

The "tests 1" report has no failures (5 flaky — the usual screencast/video/third-party-cookie regulars), so nothing to triage there. The "MCP" report is the only red one, with a single failure. The two cli-webmcp.spec.ts failures from the earlier run are gone.

Uncertain

  • [chromium] › mcp/idle-timeout.spec.ts:61 › cdp endpoint only disconnects on idle and reconnects to the same pages @mcp-ubuntu-latest-chromium — fails with browserBackend.callTool: Target page, context or browser has been closed while navigating to /hello-world, so the snapshot comes back undefined. It passed in the same run on macOS-chromium, Windows-chromium, Ubuntu-chrome, macOS-chrome and Windows-msedge.

    What I can say: the diff is packages/playwright/src/common/testType.ts plus its types, docs and tests/playwright-test/test-locks.spec.ts. Suite-level locks in the test runner have no bearing on MCP's CDP-endpoint reconnect logic, and the playwright-test project is green.

    What I can't say: this exact (project, file, title) has 0 failures in 487 runs in the results DB (2026-09-10 → 2026-09-21) — this is its first, so there's no cross-run flip to point at. Circumstantial support only: the sibling test in the same file, closes the browser after the idle timeout and relaunches it on the next call, fails with the identical error string on four unrelated PRs — #42785, #42758, #42760, #42718 — and scheme-detach.spec.ts › recovers and can screenshot after the debugger is detached hits the same signature on 9 distinct SHAs. So the idle/reconnect teardown race is a known shape in this area; I just can't prove it for this test on this bot.

    To be sure: rerun mcp-ubuntu-latest-chromium. A green rerun puts this in the flake bucket.

Caused by this PR

Nothing I can attribute.

Triaged by the Playwright bot - agent run

@dcrousso
Devin Rousso (dcrousso) merged commit 04e547b into microsoft:main Sep 21, 2026
44 of 45 checks passed
@dcrousso
Devin Rousso (dcrousso) deleted the fix-42782 branch September 21, 2026 19:15
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]: Declare a lock for the enclosing suite with test.describe.configure({ lock })

2 participants