Repository navigation
Skip the SSO E2E tests when Tsinghua's sites hang mid-load, and say why they didn't answer - #1806
Merged
Merged
Conversation
The check before each @network SSO test skipped with only "doesn't answer from here". It now adds the request's error code (ECONNRESET, UND_ERR_CONNECT_TIMEOUT, TimeoutError, ENOTFOUND...), so the reports tell a connection the site cut from one that timed out or a name that didn't resolve. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… both sites first Windows runs also failed with the web view still loading Tsinghua's login page after 30 s, with no load error (location.hostname null). The tests now keep the web view's main frame navigations and dom-ready, and skip when it is still loading a Tsinghua page when the wait ends. A network load failure now counts on any Tsinghua site, not only id.tsinghua.edu.cn, and is checked again after the wait, in case it lands just then. The check before each test now also asks learn.tsinghua.edu.cn, where the web view starts, besides id.tsinghua.edu.cn, and names the site that didn't answer. 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
Changes to the
@networktests inelectron/e2e/sso.e2e.ts:cause.codefrom Node's fetch (ECONNRESET,UND_ERR_CONNECT_TIMEOUT,ENOTFOUND, …), or the error's name (TimeoutError). Before, it said only "doesn't answer from here". The check now also covers learn.tsinghua.edu.cn, where the web view starts (SSO_LOGIN_URL), as well as id.tsinghua.edu.cn, where it lands. Any HTTP answer still counts as reachable.Received: null). The tests now keep track of the web view's main-frame navigations and itsdom-readyevent. If it is still loading a Tsinghua page when the wait ends, the test skips, the same way the check before the test does.Any other outcome still fails the test: a page that loaded but isn't the login page, a load that never started, a load outside Tsinghua, or an error that isn't from the network.
Testing
Run locally, forcing the tests past the check before the test:
ERR_TUNNEL_CONNECTION_FAILED (-111). The cancel test passes.tsc -p electron, oxlint and oxfmt pass.🤖 Generated with Claude Code