test(e2e): name the load that never answered - #15
Merged
Conversation
A console scenario that fails on a control it cannot find prints the requests the page sent. Those requests said only that the page asked for something, never whether it got an answer, so a fetch the network broke and a fetch the page abandoned looked alike: both are a URL in a list. The session now subscribes the browser's loadingFailed event and keeps what each failed load reported, keyed by the request id the browser uses for every later event about a request. The report prints that reason beside the URL it was for. Chrome cancels every load still in flight when the page leaves for another document, so the reason carries a canceled prefix when it does. That prefix is what separates a page that navigated away from a connection that broke under it. Proved by aborting one fetch mid-flight, against which the report reads "GET https://gateway/v1/limits -- no answer: canceled: net::ERR_ABORTED".
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.
What
session.report()printed the requests the page sent as method and URL. It said nothing about whether any of them got an answer, so a fetch the network broke and a fetch the page abandoned read identically.The session now subscribes
Network.loadingFailedand keeps each failed load's reason, keyed by the request id. The report prints the reason beside the URL:Why it matters
Chrome cancels every in-flight load when the page leaves for another document, so a navigation shows up as
canceled:. A broken connection shows the transport error without the prefix. That is the discriminator theconsole-oidcfailure needs and does not currently have: today its report can say where the browser went, but not whether a panel fetch died at the transport on the way.How it was verified
The instrument was made to fire before being kept: an aborted fetch in
console-basicproduced the line quoted above, correlated back to the right URL. The probe was then removed and both console scenarios pass against a live cluster (ok github.com/arloliu/profgate/test/e2e 63.139s).mise run check,mise run lintandmise run proseare clean.Scope
Instrument only. No scenario, no product code, and no assertion changes.