Skip to content

test(evaluate): drop page timers from the overwritten Promise test - #43439

Merged
Yury Semikhatsky (yury-s) merged 1 commit into
mainfrom
fix-test-overwritten-promise
Oct 15, 2026
Merged

Yury Semikhatsky (yury-s) merged 1 commit into
mainfrom
fix-test-overwritten-promise

Conversation

@yury-s

Copy link
Copy Markdown
Member

The assertions added in #43436 resolved the promise and set the flag with setTimeout in the page. The frozen-clock project (PW_CLOCK=frozen) pauses page timers, so page.evaluateHandle never returned and "should work with overwritten Promise" timed out on the frozen-time-library-chromium-linux bot on every commit since:

Resolve the promise from a microtask and set the flag before polling instead. Checked that against the pre-#43436 utility script the test still fails on Firefox and WebKit (jsonValue() is not 42), and that the whole spec passes under PW_CLOCK=frozen and on all three browsers.

The assertions added in #43436 resolved the promise and set the flag with
setTimeout in the page. The frozen-clock project pauses page timers, so
page.evaluateHandle never returned and the test timed out on the
frozen-time-library-chromium-linux bot on every commit since.

Resolve the promise from a microtask and set the flag before polling
instead. Against the pre-#43436 utility script the test still fails on
Firefox and WebKit, where jsonValue() does not return 42.

Failing runs:
https://github.com/microsoft/playwright/actions/runs/38803229595
https://github.com/microsoft/playwright/actions/runs/38803289664
https://github.com/microsoft/playwright/actions/runs/38808174514
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [chrome] › mcp/secrets.spec.ts:21 › browser_type @mcp-macos-latest-chrome

5153 passed, 614 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

5 flaky ⚠️ [playwright-test] › ui-mode-trace.spec.ts:827 › should update state on subsequent run `@playwright-x64-server2025-64-core-node22`
⚠️ [chromium-library] › library/chromium/chromium.spec.ts:301 › should report intercepted service worker requests in HAR `@chromium-playwright-x64-ubuntu24-64-core-node22`
⚠️ [chromium-library] › library/video.spec.ts:762 › screencast › should work with video+trace `@chromium-playwright-x64-ubuntu24-64-core-node22`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:257 › third party 'Partitioned;' cookies `@firefox-playwright-x64-ubuntu24-64-core-node22`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:470 › top level 'Partitioned;' cookie and same origin iframe `@firefox-playwright-x64-ubuntu24-64-core-node22`

23557 passed, 710 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I took a first look at the CI failure.

🟡 The failure is likely unrelated to this PR, but it is not a confirmed flake

mcp/secrets.spec.ts:21 timed out after its MCP connection closed. This PR only changes timer use in tests/page/page-evaluate.spec.ts, so it does not appear to reach the failing MCP test or its product path.

Details

Uncertain

  • [chrome] › mcp/secrets.spec.ts:21 › browser_type — the macOS Chrome run timed out after 30 seconds with McpError: MCP error -32000: Connection closed. The PR changes one test in page-evaluate.spec.ts from page timers to a microtask and a direct assignment; it does not change MCP, secrets handling, browser typing, or shared implementation code.
  • The refreshed test-results database has 417 other recent Chrome runs for this exact (project_name, file, test_title). All 417 passed, with no failures rescued by retry. There is therefore no matching failure on an unrelated SHA to confirm this as a pre-existing flake. The same failure on an unrelated SHA would confirm a flake; consistent reproduction only on this PR would point back to the PR.

Triaged by the Playwright bot - agent run

@yury-s
Yury Semikhatsky (yury-s) marked this pull request as ready for review October 15, 2026 22:45
@yury-s
Yury Semikhatsky (yury-s) merged commit e1fc32f into main Oct 15, 2026
25 of 26 checks passed
@yury-s
Yury Semikhatsky (yury-s) deleted the fix-test-overwritten-promise branch October 15, 2026 22:48
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.

2 participants