Repository navigation
Skip the SSO E2E tests when Tsinghua's site drops out mid-test - #1805
Merged
Merged
Conversation
The @network SSO tests checked that id.tsinghua.edu.cn answered before each test, but the site can stop answering a few seconds later, so the web view showed Chromium's error page (chromewebdata) and the test failed instead of skipping. They now record the web view's main frame load failures and skip when its load of the login page fails with a network error (time out, connection or host name error), as the check before the test does. Other failures, such as a load the app blocked or a certificate error, still fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Requested by Rui · project thread
Summary
The
@networktests inelectron/e2e/sso.e2e.tscheck that id.tsinghua.edu.cn answers before each test and skip when it doesn't. The site can still stop answering a few seconds later, while the web view loads it: the web view then shows Chromium's error page, its hostname readschromewebdata, and the test failed after 30 s instead of skipping (main's Windows E2E on 6c33309; its retry was skipped by the check).The tests now record the web view's main frame
did-fail-loadevents (a capturing listener on the document, since they don't bubble) and, while waiting for the login page, skip when its load failed with a network error: a time out (-7), a changed network (-21), a connection or host name error (-100 to -199) or an empty answer (-324). Any other failure, such as a load the app blocked or a certificate error, still fails the test.Testing
Received: "chromewebdata". With the change they skip in about 2 s with "https://id.tsinghua.edu.cn/ stopped answering: ERR_TUNNEL_CONNECTION_FAILED (-111)"; the cancel test still passes.tsc -p electron, oxlint and oxfmt pass.Generated by Claude Code