test: use --port=0 in most sequential debugger tests and move them to parallel
test: use --port=0 in debugger tests that do not have to work on 9229
To avoid failures when there is another running process occupying the port 9229 which may happen if there is a stale process, use the --port argument of node-inspect to use a random port in tests that don't have to work on port 9229.
The following tests are not touched:
- test-debugger-custom-port: tests a specific port
- test-debugger-debug-brk: tests a specific port
- test-debugger-invalid-args: tests other inspect combinations
- test-debugger-pid: node-inspect does not support -p and --port together
- test-debugger-launch: tests that default port is 9229
Based on: https://github.com/nodejs/node/pull/44342
test: move debugger tests with --port=0 to parallel
Before
❯ tools/test.py "sequential/test-debugger*"
[00:25|% 100|+ 32|- 0]: Done
All tests passed.
❯ tools/test.py -J "parallel/test-debugger*"
[00:05|% 100|+ 6|- 0]: Done
All tests passed.
After
❯ tools/test.py "sequential/test-debugger*"
[00:06|% 100|+ 5|- 0]: Done
All tests passed.
❯ tools/test.py -J "parallel/test-debugger*"
[00:05|% 100|+ 33|- 0]: Done
All tests passed.