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)
  • Loading branch information
lpinca committed Sep 9, 2023
1 parent b64c3ee commit 03a2d48
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 03a2d48

Please sign in to comment.