TestArmada / nightwatch-extra

MIT License
30 stars 26 forks source link

Fix bail reason #85

Closed archlichking closed 7 years ago

archlichking commented 7 years ago

When test bails, nightwatch instance will be destroyed before the child process is able to handle the message back from magellan process. This behavior causes a bug where

✖ Error: Killed by magellan after 5000ms (long running test)
    at process.nextTick (internal/child_process.js:758:12)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)
FAILED:  1 errors (3.429s)

should be in the output instead of

_immediateCallback: [Function: processImmediate] }
✖ TypeError: Cannot read property 'assert' of undefined
    at process.nextTick (internal/child_process.js:758:12)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)
FAILED:  1 errors (3.44s)

test fails still but it fails with a totally different reason (calling assert on an undefined object instead of the correct bail result).

codecov-io commented 7 years ago

Codecov Report

Merging #85 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #85   +/-   ##
======================================
  Coverage    98.8%   98.8%           
======================================
  Files          21      21           
  Lines         924     924           
  Branches      153     153           
======================================
  Hits          913     913           
  Misses         11      11
Impacted Files Coverage Δ
lib/worker/magellan.js 88.23% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1114a0d...eb00163. Read the comment docs.