test: fix flaky test-https-server-close- tests#43216
test: fix flaky test-https-server-close- tests#43216nodejs-github-bot merged 1 commit intonodejs:mainfrom
Conversation
f3f6774 to
9f2d594
Compare
| client1Closed = true; | ||
| })); | ||
| client1.on('connect', common.mustCall(() => { | ||
| assert.strictEqual(connections, 1); |
There was a problem hiding this comment.
| 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.
@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.
@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 <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Don't initiate the second connection until the first has been
established.
Refs: nodejs/reliability#289