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: #49327 (comment)
PR-URL: #49575
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
  • Loading branch information
lpinca authored and ruyadorno committed Sep 28, 2023
1 parent 1beefd5 commit 185d9b5
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 185d9b5

Please sign in to comment.