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

Properly catch exception so that test can run to end #27752

Merged
merged 1 commit into from Feb 25, 2021
Merged

Conversation

WeizhongX
Copy link
Contributor

Met WebDriverException and it is not properly catched,
and cause an Assertion error in restart_runner, cause
the whole test abort early

Bug: 27751

Met WebDriverException and it is not properly catched,
and cause an Assertion error in restart_runner, cause
the whole test abort early
Bug: 27751
@wpt-pr-bot wpt-pr-bot added infra wptrunner The automated test runner, commonly called through ./wpt run labels Feb 23, 2021
Copy link
Contributor

@LukeZielinski LukeZielinski left a comment

Choose a reason for hiding this comment

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

For some additional background, this happens when a new test starts and webdriver attempts to activate the newly-created window but the browser crashes in the middle of the navigation.

The effect is that the uncaught exception goes all the way out to the runner manager and aborts the test loop.

This kind of browser issue should be handled gracefully in the runner.

try:
if test.environment != self.last_environment:
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this should be in a separate try/except block before this one, and perhaps results in an "INTERNAL-ERROR" or something? Maybe @jgraham can comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Luke, if this is due to an issue at browser side, then "ERROR" is more appropriate? I tried and did not reproduce this on clank. What does "INTERNAL-ERROR" mean? thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

I think result_from_exception will convert this into INTERNAL-ERROR and I think that's the correct result for this case (since it's an error not assoicated with the specific test code).

try:
if test.environment != self.last_environment:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think result_from_exception will convert this into INTERNAL-ERROR and I think that's the correct result for this case (since it's an error not assoicated with the specific test code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants