Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reinitialize BrowserManager's command queue after it is recreated #49693

Merged
merged 3 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tools/wptrunner/wptrunner/browsers/chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ def update_properties():
return (["debug", "os", "processor"], {"os": ["version"], "processor": ["bits"]})

class ChromeBrowser(WebDriverBrowser):

# Chrome browser's default startup timeout is 60 seconds. Use 65 seconds here
# to allow error message be displayed if that happens.
init_timeout: float = 65

def __init__(self,
logger: StructuredLogger,
leak_check: bool = False,
Expand Down
4 changes: 3 additions & 1 deletion tools/wptrunner/wptrunner/testrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,9 @@ def _ensure_runner_stopped(self):
self.logger.debug("Recreating command queue")
self.command_queue.cancel_join_thread()
self.command_queue.close()
self.command_queue = mp.Queue()
# Reset the command queue for BrowserManager also as that won't
# be set again during retry.
self.browser.command_queue = self.command_queue = mp.Queue()
self.logger.debug("Recreating remote queue")
self.remote_queue.cancel_join_thread()
self.remote_queue.close()
Expand Down