test: refactor and deflake test-tls-sni-server-client
- Run all tests in parallel.
- Move
socket.end()
call to client. - Use
common.mustCall()
andcommon.mustNotCall()
.
Fixes: https://github.com/nodejs/node/issues/27219 Refs: https://github.com/nodejs/node/pull/27300
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines