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-http-highwatermark #17949

Closed

Conversation

apapirovski
Copy link
Member

@apapirovski apapirovski commented Jan 2, 2018

The current version of the test is dependent on the requests coming in before the data is successfully sent & read. Make write size much larger and delay the read on the other side a bit to get rid of the flakiness.

Fixes: #17857

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

@apapirovski apapirovski added the test Issues and PRs related to the tests. label Jan 2, 2018
@apapirovski
Copy link
Member Author

apapirovski commented Jan 2, 2018

@maclover7
Copy link
Contributor

@apapirovski Would you be able to run a stress test on OSX for this, it seems like that was the platform it was failing on most often

cc @Trott

@apapirovski
Copy link
Member Author

apapirovski commented Jan 2, 2018

Sure. Here it is: https://ci.nodejs.org/job/node-stress-single-test/1596/

(Although I'm on OS X so I already ran it locally.)

Edit: New one after making a minor tweak based on the feedback below: https://ci.nodejs.org/job/node-stress-single-test/1606/

@@ -39,11 +39,11 @@ const server = http.createServer(function(req, res) {
}).on('listening', () => {
const c = net.createConnection(server.address().port, () => {
c.write('GET / HTTP/1.1\r\n\r\n');
c.write('GET / HTTP/1.1\r\n\r\n');
c.write('GET / HTTP/1.1\r\n\r\n',
() => setImmediate(() => c.on('data', () => {})));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: c.resume()? It removes the noop.

@apapirovski apapirovski added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 3, 2018
@BridgeAR
Copy link
Member

BridgeAR commented Jan 5, 2018

Another minimal CI to verify the fixup: https://ci.nodejs.org/job/node-test-commit-light/99/

@BridgeAR BridgeAR added the fast-track PRs that do not need to wait for 48 hours to land. label Jan 5, 2018
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Jan 5, 2018
PR-URL: nodejs#17949
Fixes: nodejs#17857
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@BridgeAR
Copy link
Member

BridgeAR commented Jan 5, 2018

Landed in a51944d

@BridgeAR BridgeAR closed this Jan 5, 2018
@apapirovski apapirovski deleted the fix-test-http-highwatermark branch January 5, 2018 02:23
MylesBorins pushed a commit that referenced this pull request Jan 8, 2018
PR-URL: #17949
Fixes: #17857
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins pushed a commit that referenced this pull request Jan 9, 2018
PR-URL: #17949
Fixes: #17857
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins pushed a commit that referenced this pull request Jan 9, 2018
PR-URL: #17949
Fixes: #17857
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@MylesBorins MylesBorins mentioned this pull request Jan 10, 2018
@TimothyGu TimothyGu removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 13, 2018
MylesBorins pushed a commit that referenced this pull request Jan 24, 2018
PR-URL: #17949
Fixes: #17857
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@OrKoN
Copy link
Contributor

OrKoN commented Jan 25, 2020

@apapirovski @BridgeAR I have opened a PR for a different issue #30184 in which this test is the only one failing and I don't see an obvious reason why. I'd appreciate if you could take a look to see if there is smth wrong in my PR or the test #30184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fast-track PRs that do not need to wait for 48 hours to land. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate flaky test-http-hightwatermark
7 participants