Skip to content

test(workers): cover redirected shared worker startup - #44158

Merged
Devin Rousso (dcrousso) merged 2 commits into
mainfrom
triage/44134/43960289428-1
Nov 18, 2026
Merged

Devin Rousso (dcrousso) merged 2 commits into
mainfrom
triage/44134/43960289428-1

Conversation

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor

Cover relative script redirects and helper imports for a SharedWorker started after classic and module workers. The reported stall did not reproduce on Linux with 1.65.0 or main, including 600 two-CPU runs per version; this adds coverage without claiming a fix.

A separate test is needed because the existing dedicated-worker redirect test asserts network events that SharedWorkers do not expose, while the SharedWorker restart test checks page lifecycle without redirects.

Issue: #44134

Triaged on Linux - agent run

@github-actions

This comment has been minimized.

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor Author

🟢 All three failures predate this PR

Hi, I'm the Playwright bot. I checked the failed MCP run and found the same three failures on main.

Details and evidence

This covers MCP run 43966901964 at d085c9cf9ad7a23c8bdf6c846ac4bf7677da6433. The PR adds only a test in tests/page/workers.spec.ts and its registry entry; neither changes the MCP suite.

Pre-existing flake / infra

All three [chrome] failures in tests/mcp/crash.spec.ts also occur in the earlier main job at 826ce42b8664ea940424e77ce51f1cdf96dcd37f, with matching errors:

  • :31 — reports the navigation error, then resets and logs the crash: 30-second timeout in the crash-reset check at line 48.
  • :58 — lists only one tab: 30-second timeout, followed by Error: Not connected at line 71.
  • :79 — marks non-current crashed tab in the tab list: 30-second timeout, followed by Error: Not connected at line 93.

The PR job has the same three failures. They are confirmed pre-existing failures; this comparison does not establish whether they are intermittent or identify their root cause. No change to this PR is needed for these failures.

Checked the failures on Linux by the Playwright bot - agent run

@github-actions

This comment has been minimized.

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor Author

🟢 Both failures predate this PR

Hi, I'm the Playwright bot. I checked the failed tests 1 run and found both failures on main.

Details and evidence

This covers run 43966896620 at d085c9cf9ad7a23c8bdf6c846ac4bf7677da6433. The PR adds only a worker test and its registry entry; it does not change the JUnit reporter or its tests.

Pre-existing flake / infra

  • [playwright-test] › reporter-junit.spec.ts:350 › created / merged › should add file attribute relative to fileRoot — both variants fail in the PR Windows job and the earlier main Windows job at the PR's base commit, 826ce42b8664ea940424e77ce51f1cdf96dcd37f. Both jobs fail at line 374: expected auth/a.test.js, received auth\a.test.js.

These are confirmed pre-existing test failures, not demonstrated intermittent flakes. The classname attribute uses the platform's path separator; only the file attribute is converted to forward slashes. The small correction belongs in the existing test:

-      expect(byDefault['classname']).toBe('auth/a.test.js');
+      expect(byDefault['classname']).toBe(path.join('auth', 'a.test.js'));

No change to the worker test is needed. The separate MCP failures already have a verdict in the earlier comment.

Checked the failures on Linux by the Playwright bot - agent run

Comment thread tests/page/workers.spec.ts Outdated
expect(text).toContain(`console.log('hello from the worker');`);
});

it('WO-032 should run a shared worker after redirected dedicated workers', {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this should be after WO-031

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved WO-032 to the end of workers.spec.ts to keep the tests in numeric order. WO-031 is in browsercontext-service-worker-policy.spec.ts; the registry already lists WO-032 after it.

Revised on Linux - agent run

@microsoft-playwright-automation

This comment has been minimized.

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor Author

Moved WO-032 to the end of workers.spec.ts without changing the test, and rebased onto current main. WO-031 lives in a different file; the registry already lists WO-032 after it.

Build and full lint passed. The worker tests and related files passed on Chromium, Firefox and WebKit on Linux: 97 passed, 8 skipped.

Revised on Linux - agent run

@microsoft-playwright-automation microsoft-playwright-automation Bot added agent-review-done The Playwright bot run ended and removed agent-review labels Nov 18, 2026
@dcrousso
Devin Rousso (dcrousso) marked this pull request as ready for review November 18, 2026 23:20
@dcrousso
Devin Rousso (dcrousso) merged commit 28c4b2e into main Nov 18, 2026
41 of 43 checks passed
@dcrousso
Devin Rousso (dcrousso) deleted the triage/44134/43960289428-1 branch November 18, 2026 23:21
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

3 failed
❌ [chrome] › mcp/crash.spec.ts:31 › crash recovery › reports the navigation error, then resets and logs the crash @mcp-ubuntu-latest-chrome
❌ [chrome] › mcp/crash.spec.ts:58 › crash recovery › lists only one tab @mcp-ubuntu-latest-chrome
❌ [chrome] › mcp/crash.spec.ts:79 › crash recovery › marks non-current crashed tab in the tab list @mcp-ubuntu-latest-chrome

5243 passed, 641 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

2 failed
❌ [playwright-test] › reporter-junit.spec.ts:350 › created › should add file attribute relative to fileRoot @playwright-x64-server2025-64-core-node22
❌ [playwright-test] › reporter-junit.spec.ts:350 › merged › should add file attribute relative to fileRoot @playwright-x64-server2025-64-core-node22

2 flaky ⚠️ [installation tests] › connect-to-selenium.spec.ts:20 › connect to selenium `@package-installations-ubuntu-latest`
⚠️ [chromium-library] › library/video.spec.ts:762 › screencast › VI-030 should work with video+trace `@chromium-playwright-x64-ubuntu24-64-core-node22`

23643 passed, 716 skipped


Merge workflow run.

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

Labels

agent-review-done The Playwright bot run ended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant