Version : master
Platform : all
Subsystem : test
Tests in parallel that use common.PORT risk getting EADDRINUSE if another test in parallel uses port 0 (to get an open port assigned by the operating system) at the same time the test runs. This appears to have happened recently. (See #12363 (comment) .)
IMO, all instances of common.PORT in parallel should either be changed to use port 0 (if possible in the context of the test) or else moved to sequential (if using port 0 is not possible).
Here are the current tests that use common.PORT:
test/parallel/test-cluster-basic.js (test: remove common.PORT from test-cluster-basic #12377 )
test/parallel/test-cluster-bind-twice.js (test: use dynamic port in test-cluster-bind-twice #12418 )
test/parallel/test-cluster-dgram-1.js (test: dynamic port in cluster worker dgram #12487 )
test/parallel/test-cluster-dgram-2.js (test: dynamic port in cluster worker dgram #12487 ) (test: replace common.PORT in test-cluster-dgram-2 #12492 )
test/parallel/test-cluster-dgram-reuse.js (test: replace port in cluster dgram reuse test #12901 )
test/parallel/test-cluster-disconnect-leak.js (Migrate cluster tests from common.PORT #12441 )
test/parallel/test-cluster-disconnect-race.js (Migrate cluster tests from common.PORT #12441 )
test/parallel/test-cluster-disconnect.js
test/parallel/test-cluster-eaddrinuse.js
test/parallel/test-cluster-inspector-debug-port.js
test/parallel/test-cluster-ipc-throw.js
test/parallel/test-cluster-master-error.js (tests: remove common.PORT from shared,master,rr tests #12451 )
test/parallel/test-cluster-master-kill.js (tests: remove common.PORT from shared,master,rr tests #12451 )
test/parallel/test-cluster-message.js
test/parallel/test-cluster-net-send.js (tests: remove common.PORT from shared,master,rr tests #12451 )
test/parallel/test-cluster-process-disconnect.js (Migrate cluster tests from common.PORT #12441 )
test/parallel/test-cluster-rr-domain-listen.js (tests: remove common.PORT from shared,master,rr tests #12451 )
test/parallel/test-cluster-rr-ref.js (tests: remove common.PORT from shared,master,rr tests #12451 )
test/parallel/test-cluster-send-deadlock.js (tests: remove common.PORT from cluster send tests #12472 )
test/parallel/test-cluster-send-handle-twice.js (tests: remove common.PORT from cluster send tests #12472 )
test/parallel/test-cluster-server-restart-none.js
test/parallel/test-cluster-server-restart-rr.js
test/parallel/test-cluster-shared-handle-bind-error.js
test/parallel/test-cluster-shared-leak.js (tests: remove common.PORT from shared,master,rr tests #12451 )
test/parallel/test-cluster-worker-disconnect-on-error.js (tests: remove common.PORT from cluster-worker-disconnect-on-error #12457 )
test/parallel/test-cluster-worker-disconnect.js (tests: remove common.PORT from cluster worker disconnect, exit and kill #12443 )
test/parallel/test-cluster-worker-exit.js (tests: remove common.PORT from cluster worker disconnect, exit and kill #12443 )
test/parallel/test-cluster-worker-kill.js (tests: remove common.PORT from cluster worker disconnect, exit and kill #12443 )
test/parallel/test-cluster-worker-no-exit.js (tests: remove common.PORT from shared,master,rr tests #12451 )
test/parallel/test-cluster-worker-wait-server-close.js (tests: remove common.PORT from cluster worker wait server close #12466 )
test/parallel/test-debugger-repeat-last.js (test: moved test-debugger-repeat-last.js from parallel to sequential #12470 )
test/parallel/test-dgram-bind-shared-ports.js (test: use dynamic port in test-dgram-bind-shared-ports #12452 )
test/parallel/test-dgram-close-in-listening.js
test/parallel/test-dgram-close-is-not-callback.js
test/parallel/test-dgram-close.js
test/parallel/test-dgram-exclusive-implicit-bind.js
test/parallel/test-dgram-implicit-bind-failure.js
test/parallel/test-dgram-oob-buffer.js
test/parallel/test-dgram-send-address-types.js (test: replace port in dgram send address types test #13007 )
test/parallel/test-dgram-send-callback-buffer-empty-address.js (test: replace port in dgram cd address empty test #12929 )
test/parallel/test-dgram-send-callback-buffer-length-empty-address.js (test: replace port in dgram cb address test #12944 )
test/parallel/test-dgram-send-callback-buffer-length.js (test: replace port in dgram cb length test #12943 )
test/parallel/test-dgram-send-callback-buffer.js (test: replace port in dgram cb test #12942 )
test/parallel/test-https-connect-address-family.js (test: replace port in https address family test #12915 )
test/parallel/test-net-better-error-messages-port-hostname.js (Remove common.PORT usage from parallel tests #12473 )
test/parallel/test-net-better-error-messages-port.js
test/parallel/test-net-connect-handle-econnrefused.js
test/parallel/test-net-connect-immediate-destroy.js
test/parallel/test-net-connect-immediate-finish.js
test/parallel/test-net-connect-local-error.js
test/parallel/test-net-listen-shared-ports.js
test/parallel/test-net-localerror.js
test/parallel/test-net-localport.js
test/parallel/test-net-options-lookup.js
test/parallel/test-net-reconnect-error.js
test/parallel/test-net-server-bind.js (test: refactor test-net-server-bind #13273 )
test/parallel/test-net-socket-destroy-twice.js(Remove common.PORT usage from parallel tests #12473 )
test/parallel/test-regress-GH-5051.js
test/parallel/test-regress-GH-5727.js
test/parallel/test-tls-client-abort.js (being worked on by @ahmed-taj ) (tests: remove common.PORT from client abort #12461 )
test/parallel/test-tls-client-abort2.js (being worked on by @ahmed-taj ) (tests: remove common.PORT from client abort #12461 )
test/parallel/test-tls-client-default-ciphers.js
test/parallel/test-tls-connect.js
test/parallel/test-tls-ticket-cluster.js
Tests in
parallelthat usecommon.PORTrisk gettingEADDRINUSEif another test inparalleluses port0(to get an open port assigned by the operating system) at the same time the test runs. This appears to have happened recently. (See #12363 (comment).)IMO, all instances of
common.PORTinparallelshould either be changed to use port0(if possible in the context of the test) or else moved tosequential(if using port0is not possible).Here are the current tests that use
common.PORT:paralleltests #12473)paralleltests #12473)