test: fix flaky inspector-stop-profile-after-done
In test/sequential/test-inspector-stop-profile-after-done.js, start the
profiler before running the code to avoid a race condition. If
Profile.start
is received after the debugger is waiting to disconnect,
then the process will not terminate.
Fixes: https://github.com/nodejs/node/issues/16772
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
test inspector