test: fix flaky test-cluster-send-handle-twice
Use common.mustCall()
to make sure connection callback runs exactly
once.
Use connect
event instead of setTimeout
to avoid test failing if
timer runs before client is connected.
Remove cluster.worker.disconnect()
after assert.fail()
. It is
unreachable code that is unnecessary.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines