test: remove timers from test-tls-socket-close#53019
test: remove timers from test-tls-socket-close#53019nodejs-github-bot merged 2 commits intonodejs:mainfrom
Conversation
c679e6f to
5581681
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
| netSocket.destroy(); | ||
| assert.strictEqual(netSocket.destroyed, true); | ||
|
|
||
| setImmediate(() => { |
There was a problem hiding this comment.
We have separate tests for setImmediate().
There was a problem hiding this comment.
I don't really get what you mean, common.mustCall wouldn't be there to validate setImmediate behavior, but to ensure the assertion are actually run. Anyway, it doesn't really matter.
There was a problem hiding this comment.
We are testing that the callback of setImmediate() is called in other tests.
There was a problem hiding this comment.
It's not called if e.g. process.exit is called before it's picked up
There was a problem hiding this comment.
There is no process.exit() in the test.
There was a problem hiding this comment.
Adding common.mustCall would ensure we catch it if it was ever added
There was a problem hiding this comment.
I've added it only where it is needed given the current assumptions. If the logic changes there are other more places where it would be needed.
| let serverTlsSocket; | ||
| const tlsServer = tls.createServer({ cert, key }, (socket) => { | ||
| serverTlsSocket = socket; | ||
| socket.on('data', (chunk) => { |
There was a problem hiding this comment.
No, only one byte is sent by the other peer.
|
Landed in a81d833 |
Fixes: nodejs#49902 PR-URL: nodejs#53019 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Fixes: nodejs#49902 PR-URL: nodejs#53019 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Fixes: #49902