Repository navigation
test: wait for a browser problem to arrive before consume_browser_errors reads it - #5781
Merged
Merged
Conversation
…ors reads it A widget's failure box and its console report reach Python by separate paths, so a test that waits for the box and then consumes the problem could read an empty list. That happened on macOS in scheduled run 42604289041: test_visual_review_guides_one_typed_still_run saw "before is 1800px wide and after is 780px" in .lf-error, then consume_browser_errors found no problem. #5351 and #5352 fixed the same race test by test. consume_browser_errors now keeps the driver pumping until the first problem arrives, sharing the wait reported_browser_errors uses. A closed page stops the wait. Its assertion is unchanged. Refs #5780
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
consume_browser_errorsreadpage.lf_errorsthe moment it was called. A widget's failure box and its console report reach Python by separate paths, so a test that waited for the box and then consumed the problem could find an empty list. That is what failedtest_visual_review_guides_one_typed_still_runon macOS in scheduled run 42604289041: the page showedbefore is 1800px wide and after is 780pxin.lf-error, thenconsume_browser_errorsasserted on[]. #5351 and #5352 fixed this same race one test at a time. Now the helper itself keeps the Playwright driver pumping until the first problem arrives, using the same waitreported_browser_errorsalready had (moved into_await_browser_errors). A closed page stops the wait. What counts as a match is unchanged.The race only shows on macOS, so the failing run above is the before evidence. On Linux, the visual-review journey,
tests/model/test_chrome_contracts.py, the closed-page consumer intest_status_and_news.pyandtests/smoke/test_plain_page.pypass with the change. The next scheduledtest-macosrun shows whether it holds there.#5780's other nine macOS failures have different causes and stay open there.
Refs #5780 — automated triage