-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: fix flaky robots smoke failure #13031
Conversation
e130ce9
to
e8592ab
Compare
@@ -48,8 +48,8 @@ class RobotsTxt extends FRGatherer { | |||
|
|||
const robotsUrl = new URL('/robots.txt', passContext.url).href; | |||
await passContext.driver.fetcher.enable(); | |||
return passContext.driver.fetcher.fetchResource(robotsUrl) | |||
.catch(() => ({status: null, content: null})); | |||
return passContext.driver.fetcher.fetchResource(robotsUrl, {timeout: 1_000}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we tweak the method's default instead? and since mostly all usages of this are done in parallel (source maps), I'd be comfortable upping it to 2s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, wfm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for looking into this.
Summary
Adding more debug data to the RobotsTxt artifact and running it many times to find the flake reason.Found the flake! The error message we're getting here is "Waiting for the end of the IO stream exceeded the allotted time". I increased the timeout from 500ms to 1000ms, ran it 100 times and did not receive a single failure, so I'm calling that fixed (500ms is a decently short period to try and fetch a remote resource and read all its contents off the protocol, 1s seemed more reasonable) 👍Related Issues/PRs
fixes #13024