-
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-server-close- tests #43216
test: fix flaky test-https-server-close- tests #43216
Conversation
f3f6774
to
9f2d594
Compare
client1Closed = true; | ||
})); | ||
client1.on('connect', common.mustCall(() => { | ||
assert.strictEqual(connections, 1); |
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.
assert.strictEqual(connections, 1); |
It seems that the 'connect'
event can be emitted before the 'connection'
event on the server. I think we can remove this as the second connection is initiated from the listener of this event anyway.
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.
@santigimeno are you ok with this? I would like to see if CI is happy after this small change.
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.
@lpinca sure thing. Just rebased and pushed with that change. Sorry for the delay. Thanks!
Don't initiate the second connection until the first has been established. Refs: nodejs/reliability#289
9f2d594
to
c0c4661
Compare
@santigimeno test-http-server-close-idle is also flaky. I filed a issue at #43466. Could this pr fix test-http-server-close-idle flaky and close #43466? |
Yes, this PR fixes 4 very similar flaky tests included the one you mention. The PR title is confusing, I'll change it. |
Great work! |
Could we land this pr now? Those flaky tests often fail on my pr. |
Landed in f8f2772 |
Don't initiate the second connection until the first has been established. Refs: nodejs/reliability#289 PR-URL: #43216 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
Don't initiate the second connection until the first has been
established.
Refs: nodejs/reliability#289