Skip to content
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

Conversation

@sebastianplesciuc
Copy link
Contributor

commented May 6, 2017

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), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

@refack
refack approved these changes May 6, 2017
@refack

This comment has been minimized.

Copy link
Member

commented May 6, 2017

@sebastianplesciuc definatly better.
And for the good work I brought you a present: https://ci.nodejs.org/job/node-test-commit/9706/

@refack refack self-assigned this May 6, 2017

@refack

This comment has been minimized.

Copy link
Member

commented May 6, 2017

@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.

@mscdex mscdex added the https label May 6, 2017

@mscdex

This comment has been minimized.

Copy link
Contributor

commented May 6, 2017

@jasnell
jasnell approved these changes May 7, 2017
Copy link
Member

left a comment

LGTM if the stress test results look good

@mscdex

This comment has been minimized.

Copy link
Contributor

commented May 7, 2017

I think it's still waiting on a stuck job from earlier today...?

@sebastianplesciuc sebastianplesciuc force-pushed the sebastianplesciuc:fix-flaky-test-https-get-url branch May 7, 2017

@sebastianplesciuc

This comment has been minimized.

Copy link
Contributor Author

commented May 7, 2017

@refack Changed the Refs to Fixes in commit message. Thank you!

@lpinca
lpinca approved these changes May 7, 2017
@refack

This comment has been minimized.

Copy link
Member

commented May 7, 2017

@refack

This comment has been minimized.

Copy link
Member

commented May 7, 2017

Stress looks solid.

@refack

This comment has been minimized.

Copy link
Member

commented May 7, 2017

@addaleax

This comment has been minimized.

Copy link
Member

commented May 7, 2017

@refack Like the CI tells you to, could you please avoid running stress-tests on all platforms unless that’s really necessary?

@cjihrig
cjihrig approved these changes May 8, 2017
Copy link
Contributor

left a comment

LGTM with one request.

test/parallel/test-https-client-get-url.js Outdated
@@ -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() {

This comment has been minimized.

Copy link
@cjihrig

cjihrig May 8, 2017

Contributor

Can you add common.mustCall() here.

This comment has been minimized.

Copy link
@sebastianplesciuc

sebastianplesciuc May 8, 2017

Author Contributor

@cjihrig Added. Thanks!

@sebastianplesciuc sebastianplesciuc force-pushed the sebastianplesciuc:fix-flaky-test-https-get-url branch May 8, 2017

test/parallel/test-https-client-get-url.js Outdated
https.get(new URL(u));
});
server.listen(0, common.mustCall(() => {
const u = `https://127.0.0.1:${server.address().port}/foo?bar`;

This comment has been minimized.

Copy link
@thefourtheye

thefourtheye May 8, 2017

Contributor

Nit: Instead of 127.0.0.1, you can use common.localhostIPv4

This comment has been minimized.

Copy link
@sebastianplesciuc

sebastianplesciuc May 8, 2017

Author Contributor

@thefourtheye Fixed! Thank you!

@sebastianplesciuc sebastianplesciuc force-pushed the sebastianplesciuc:fix-flaky-test-https-get-url branch to d3f29e7 May 8, 2017

Sebastian Plesciuc
test: fix flaky test-https-client-get-url
Fixed test-https-client-get-url by waiting on HTTPS GET
requests to finish before closing the server.

Fixes: #12873
refack added a commit to refack/node that referenced this pull request May 10, 2017
test: fix flaky test-https-client-get-url
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>
@refack

This comment has been minimized.

Copy link
Member

commented May 10, 2017

Landed in 317180f

@refack

This comment has been minimized.

Copy link
Member

commented May 10, 2017

Post land CI:https://ci.nodejs.org/job/node-test-commit/9785/
(Since the CI is on master the one CI job covers three small lands I did almost together.)

anchnk pushed a commit to anchnk/node that referenced this pull request May 19, 2017
Sebastian Plesciuc Olivier Martin
test: fix flaky test-https-client-get-url
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>
@jasnell jasnell referenced this pull request May 28, 2017
@gibfahn gibfahn referenced this pull request Jun 15, 2017
2 of 3 tasks complete
@MylesBorins

This comment has been minimized.

Copy link
Member

commented Jul 17, 2017

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

@sebastianplesciuc

This comment has been minimized.

Copy link
Contributor Author

commented Jul 17, 2017

@MylesBorins This can't be backported.

The test flaked because of multiple https.get requests using both the Legacy and the latest version of url. The version of the test that is in the 6.x-staging branch only has one https.get call: https://github.com/nodejs/node/blob/v6.x-staging/test/parallel/test-https-client-get-url.js

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 :)

@MylesBorins

This comment has been minimized.

Copy link
Member

commented Jul 17, 2017

Thanks @sebastianplesciuc

updated labels

@refack refack removed their assignment Oct 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.