Skip to content

test: fix flaky test-cluster-send-handle-twice

Rodrigo Muino Tomonari requested to merge github/fork/Trott/fix-send-twice into master

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), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading