Commit 8bc39e72 authored by Sam Roberts's avatar Sam Roberts
Browse files

test: do not assume server gets secure connection

Test assumed that server got the the connection before the client
destroys it, but that is not guaranteed. Also, the test was closing the
TCP connection 3 times, effectively:

1. on the server side, right after TLS connection occurs (if it does)
2. on the client side, internal to tls, when the cert is rejected
3. again on the client side, in the error event which is emitted by
   the internal tls destroy from 2

This is too often, and the dependency on 1 occurring is fragile.

PR-URL: https://github.com/nodejs/node/pull/25508


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent cdd6eb23
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment