-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
test: fix flaky test-https-client-get-url #12876
test: fix flaky test-https-client-get-url #12876
Conversation
@sebastianplesciuc definatly better. |
@sebastianplesciuc I changed the "Ref" -> "Fixes" in the first comment You can change it in the commit message, so when this lands, the issue will be closed automatically. |
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 if the stress test results look good
I think it's still waiting on a stuck job from earlier today...? |
@refack Changed the |
Stress looks solid. |
CI (macOS only): https://ci.nodejs.org/job/node-test-commit-osx/9624/ |
@refack Like the CI tells you to, could you please avoid running stress-tests on all platforms unless that’s really necessary? |
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 with one request.
@@ -47,12 +47,15 @@ const server = https.createServer(options, common.mustCall(function(req, res) { | |||
res.writeHead(200, {'Content-Type': 'text/plain'}); | |||
res.write('hello\n'); | |||
res.end(); | |||
server.close(); | |||
}, 3)); | |||
|
|||
server.listen(0, function() { |
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.
Can you add common.mustCall()
here.
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.
@cjihrig Added. Thanks!
https.get(new URL(u)); | ||
}); | ||
server.listen(0, common.mustCall(() => { | ||
const u = `https://127.0.0.1:${server.address().port}/foo?bar`; |
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.
Nit: Instead of 127.0.0.1
, you can use common.localhostIPv4
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.
@thefourtheye Fixed! Thank you!
Fixed test-https-client-get-url by waiting on HTTPS GET requests to finish before closing the server. Fixes: #12873
Fixed test-https-client-get-url by waiting on HTTPS GET requests to finish before closing the server. PR-URL: nodejs#12876 Fixes: nodejs#12873 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Landed in 317180f |
Post land CI:https://ci.nodejs.org/job/node-test-commit/9785/ |
Fixed test-https-client-get-url by waiting on HTTPS GET requests to finish before closing the server. PR-URL: nodejs#12876 Fixes: nodejs#12873 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This does not land cleanly in LTS. Please feel free to manually backport. Please also feel free to replace the backport request label with do-not-land if it shouldn't land |
@MylesBorins This can't be backported. The test flaked because of multiple Docs also seem to confirm this, URL in Node 6 LTS vs URL in Node 8. Please correct me if I'm wrong and also please set the proper labels because I can't :) |
Thanks @sebastianplesciuc updated labels |
Fixes test-https-client-get-url by waiting on HTTPS GET
requests to finish before closing the server.
Fixes: #12873
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test