Skip to content

Commit

Permalink
test: deflake test-tls-socket-close
Browse files Browse the repository at this point in the history
Move the check for the destroyed state of the remote socket to the inner
`setImmediate()`.

Refs: nodejs#49327 (comment)
PR-URL: nodejs#49575
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
  • Loading branch information
lpinca authored and alexfernandez committed Nov 1, 2023
1 parent 4de67a6 commit d05e6bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-tls-socket-close.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ function connectClient(server) {

setImmediate(() => {
assert.strictEqual(netSocket.destroyed, true);
assert.strictEqual(clientTlsSocket.destroyed, true);

setImmediate(() => {
assert.strictEqual(clientTlsSocket.destroyed, true);
assert.strictEqual(serverTlsSocket.destroyed, true);

tlsServer.close();
Expand Down

0 comments on commit d05e6bc

Please sign in to comment.