test: fix flaky test-https-timeout
Remove setTimeout()
in test and instead rely on common.mustCall()
on
a timeout
event handler.
The test was flaky on CI. The flakiness was replicable by running the test under load. This version, in contrast, is robust under load.
Took the opportunity to do some var
-> const
while refactoring.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
test https