Skip to content

devtools: Fix console exception test being flaky - #45753

Merged
atbrakhi merged 1 commit into
servo:mainfrom
eerii:fix-console-throw-test
Jun 17, 2026
Merged

atbrakhi merged 1 commit into
servo:mainfrom
eerii:fix-console-throw-test

Conversation

@eerii

@eerii eerii commented Jun 17, 2026

Copy link
Copy Markdown
Member

Before we were overwriting the evaluation_result future. Additionally, when checking that the result_id matched the evaluation result, there was a race condition where the event could fire before we set result_id.

Now we removed the check from on_evaluation, as there should only be one result anyways in this test. Also, since this test is the only one that used the evaluate function, it is now inlined in the test. If we have this pattern more times we can split it again.

Testing: Changes to existing test, test_console_throw_exception.

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jun 17, 2026
@eerii eerii added the T-linux-devtools Do a try run on Linux of the devtools tests. label Jun 17, 2026
@eerii

eerii commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

Let's also see if the CI testing label works c:

Before we were overwriting the `evaluation_result` future. Additionally,
when checking that the `result_id` matched the evaluation result, there
was a race condition where the event could fire before we set
`result_id`.

Now we removed the check from `on_evaluation`, as there
should only be one result anyways in this test. Also, since this test
is the only one that used the `evaluate` function, it is now inlined in
the test. If we have this pattern more times we can split it again.

Signed-off-by: eri <[email protected]>
@eerii
eerii force-pushed the fix-console-throw-test branch from 1e1430d to 6d3dabe Compare June 17, 2026 09:18
@github-actions github-actions Bot removed the T-linux-devtools Do a try run on Linux of the devtools tests. label Jun 17, 2026
@github-actions

Copy link
Copy Markdown

🔨 Triggering try run (#27678573408) for Linux (Devtools Tests)

@github-actions

Copy link
Copy Markdown

✨ Try run (#27678573408) succeeded.

@eerii

eerii commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

Nice, it worked!

 [gw0] [ 96%] PASSED python/servo/devtools_tests/test_network_tab.py::TestNetworkTab::test_stylesheet_inline 
[gw1] [ 97%] PASSED python/servo/devtools_tests/test_network_tab.py::TestNetworkTab::test_navigation 
python/servo/devtools_tests/test_network_tab.py::TestNetworkTab::test_stylesheet_content 
python/servo/devtools_tests/test_network_tab.py::TestNetworkTab::test_stylesheet_linked 
[gw1] [ 98%] PASSED python/servo/devtools_tests/test_network_tab.py::TestNetworkTab::test_stylesheet_linked 
[gw0] [100%] PASSED python/servo/devtools_tests/test_network_tab.py::TestNetworkTab::test_stylesheet_content 

=================== 72 passed, 7 xfailed in 61.59s (0:01:01) ===================

I think for the future it would be nice to have the failed tests appear in the comment like they do for WPT (I don't think it will work like that now), but it's a good start being able to check in the CI.

I guess we should encourage maintainers to always add the T-linux-devtools tag for PRs changing the devtools code.

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Jun 17, 2026
@atbrakhi
atbrakhi added this pull request to the merge queue Jun 17, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jun 17, 2026
Merged via the queue into servo:main with commit 6cd5acf Jun 17, 2026
31 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jun 17, 2026
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.

3 participants