Skip to content

fix(waiter): propagate async predicate cancellation - #3381

Draft
microsoft-playwright-automation[bot] wants to merge 1 commit into
mainfrom
triage/3379/45794865091-1
Draft

microsoft-playwright-automation[bot] wants to merge 1 commit into
mainfrom
triage/3379/45794865091-1

Conversation

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor
  • An async predicate's CancelledError bypasses except Exception, leaving its event future pending. Remove the listener and settle the future with the cancellation before re-raising it in the predicate task.
  • Use the explicit cancellation handling also proposed in fix: handle cancellation in async event predicates #3380. Extend the existing async-predicate error test with a cancellation case and a listener-cleanup assertion.

Verified on Linux with Python 3.12.3: the regression fails without the fix and passes on Chromium, Firefox and headed WebKit. Neighboring async/sync checks pass (155 passed, 2 existing headless-only skips), as do mypy playwright and ./scripts/lint.sh. Headless WebKit could not create an EGL display.

Fixes #3379

Triaged on Linux by the Playwright bot - agent run

This branch has not been deployed

No deployments
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.

[Bug]: Async event predicate raising CancelledError leaves the event waiter pending

0 participants