Skip to content

Use browser timeout for async target registration - #614

Closed
route with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-tests-3-3-failure
Closed

Use browser timeout for async target registration#614
route with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-tests-3-3-failure

Conversation

Copilot AI commented Aug 19, 2026

Copy link
Copy Markdown

Ruby 3.3 CI was failing in Tests (3.3) because page creation could raise Ferrum::NoSuchTargetError while waiting for Target.createTarget to be reflected back through async target events. The wait path was using the low-level protocol timeout instead of the normal browser operation timeout.

  • Root cause

    • Ferrum::Context#create_target waited for target registration with @client.protocol_timeout
    • That timeout is tuned for direct CDP request/response bookkeeping, not for async Target.* event delivery and processing
  • Change

    • Switch target registration waiting to the browser timeout budget:
      resolved = pending.value(@client.options.timeout)
    • This keeps protocol_timeout scoped to transport-level CDP calls while allowing target creation to complete under normal page-operation timing
  • Regression coverage

    • Add a focused spec for Ferrum::Context#create_target
    • The spec uses a tiny protocol_timeout and a larger browser timeout, then resolves add_target asynchronously to verify create_target waits on the correct timeout source

Co-authored-by: route <414803+route@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Tests (3.3) Use browser timeout for async target registration Aug 19, 2026
Copilot AI requested a review from route August 19, 2026 19:17
@route route closed this Aug 20, 2026
@route
route deleted the copilot/fix-tests-3-3-failure branch August 20, 2026 13:58
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