Skip to content

test: fix flaky test-dgram-empty-packet & friends

Rodrigo Muino Tomonari requested to merge github/fork/Trott/de-timer-ize into master
Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test dgram

Description of change
  • Liberal use of common.mustCall()
  • Rename test-dgram-empty-packet -> test-dgram-send-empty-packet
  • Remove use of timers to avoid CI failures like seen in the Ref below:
not ok 237 parallel/test-dgram-empty-packet
  ---
  duration_ms: 0.717
  severity: fail
  stack: |-
    /usr/home/iojs/build/workspace/node-test-commit-freebsd/nodes/freebsd11-x64/test/parallel/test-dgram-empty-packet.js:38
        throw new Error('Timeout');
        ^

    Error: Timeout
        at Timeout._onTimeout
(/usr/home/iojs/build/workspace/node-test-commit-freebsd/nodes/freebsd11-x64/test/parallel/test-dgram-empty-packet.js:38:11)
        at ontimeout (timers.js:365:14)
        at tryOnTimeout (timers.js:237:5)
        at Timer.listOnTimeout (timers.js:207:5)

Refs: https://ci.nodejs.org/job/node-test-commit-freebsd/5341/nodes=freebsd11-x64/console:

Merge request reports

Loading