Closed SemenchenkoVitaliy closed 5 years ago
Looks like timeout occurred before the function of a test in question was even run, therefore plan
wasn't set up on the test and hence the lack of its result. Unfortunately, this test tests the timeout, therefore, I'm not sure how to refactor this test to remove this race condition. For now, I'll increase the timeout to 500 to hopefully make it even less frequent.
must correctly report plan after timeout
test in test/plan-timeout-result.js failed onmaster
. Looks like a one-time issue as it doesn't seem I can reproduce it anymore.Raw test results
``` $ npm test > metatests@0.7.0 test /home/vitaliy/nodejs/tests > npm run lint && ./bin/cli.js test --exclude test/fixtures > metatests@0.7.0 lint /home/vitaliy/nodejs/tests > eslint . && prettier -c "**/*.js" "**/*.json" "**/*.md" ".*rc" "**/*.yml" Checking formatting... All matched files use Prettier code style! Node v11.15.0 (v8 7.0.276.38-node.19): Declarative example ................................... 7/7 dependentSubtests and parallelSubtests are exclusive .. 1/1 sequential, must be possible to call end .............. 1/1 test plan ............................................. 3/3 test must fail if assertion failed .................... 1/1 test must not fail if no assertion failed ............. 1/1 # Subtest: ............................................ 1/1 # Subtest: ............................................ 1/1 must call done listener after test end ................ 1/1 must end on test.plan(0) .............................. 1/1 must end on test.plan(<0) ............................. 1/1 async test immediate end .............................. 1/1 must correctly report plan after timeout .............. 1/1 must support bailout .................................. 2/2 must support bailout message .......................... 3/3 must correctly define error message ................... 3/3 must support bailout error ............................ 4/4 must support timeout .................................. 3/3 must support bailout message and error ................ 4/4 test must be async .................................... 1/1 Empty test ............................................ 1/1 453ms strictSame ............................................ 1/1 467ms assert ................................................ 1/1 475ms assertNot ............................................. 1/1 476ms same .................................................. 1/1 479ms error ................................................. 1/1 488ms type .................................................. 2/2 test.type with no constructor ......................... 3/3 must not be todo by default ........................... 1/1 472ms throw with empty error ................................ 1/1 441ms throw with message error .............................. 1/1 445ms throw with type error (compare to Error) .............. 1/1 449ms doesNotThrow failure .................................. 3/3 doesNotThrow success .................................. 1/1 453ms isError no error provided ............................. 1/1 455ms isError with error provided ........................... 1/1 456ms testSync must return a test ........................... 1/1 462ms testAsync must return a test .......................... 1/1 448ms must catch unhandledExceptions ........................ 5/5 must correctly report plan after timeout .............. 0/1 407ms not ok strictSame --- wanted +++ found [ { - "actual": 0 - "expected": 1 - "message": "Expected to pass 'plan' (1) number of asserts" - "stack": [null] - "success": false - "type": "test" - } - { "message": "Test execution time exceed timeout (300)" "stack": [null] "success": false "type": "timeout" severity: fail type: strictSame at: file: /home/vitaliy/nodejs/tests/test/plan-timeout-result.js stack: > ImperativeTest.t.on (/home/vitaliy/nodejs/tests/test/plan-timeout-result.js:13:10) ImperativeTest.emit (events.js:198:15) ImperativeTest.EventEmitter.emit (domain.js:504:23) listOnTimeout (internal/timers.js:535:17) processTimers (internal/timers.js:479:7) 'pass' result must not contain actual/expected ........ 4/4 must support test.plan ................................ 1/1 must support mustCall ................................. 4/4 must support empty mustCall ........................... 4/4 must support mustCall (many) .......................... 4/4 must support mustCall (fail) .......................... 5/5 must support mustNotCall .............................. 4/4 must support empty mustNotCall ........................ 4/4 must support mustNotCall (fail) ....................... 5/5 mustCall wrapper must return same value ............... 2/2 584ms mustNotCall wrapper must return same value ............ 1/1 585ms must support Error from another context ............... 1/1 591ms must support simple contains .......................... 1/1 591ms must support contains comparator ...................... 1/1 589ms must support contains of errors ....................... 1/1 590ms test must contain `filepath` in metadata .............. 1/1 589ms test must contain `filepath` in metadata .............. 1/1 589ms test.cb with message .................................. 1/1 578ms test.cb with message and callback ..................... 2/2 579ms test.cb must assert mustCall .......................... 4/4 test.cb must forward error ............................ 3/3 test.cb must forward results .......................... 4/4 test.cbFail must support message ...................... 5/5 test.cbFail must assert mustCall ...................... 4/4 test.cbFail must forward results ...................... 3/3 test.cbFail must call afterAllCb on success ........... 3/3 test.cbFail must call afterAllCb on error ............. 5/5 must support test.fail() .............................. 4/4 must support test.fail(msg, err) ...................... 4/4 must support test.fail(err) ........................... 4/4 test.sameTopology ..................................... 1/1 552ms assert.js:341 throw err; ^ AssertionError [ERR_ASSERTION]: bailout must be called at Timeout.setTimeout [as _onTimeout] (/home/vitaliy/nodejs/tests/test/unit/imperative.dependent-failure.js:21:18) at listOnTimeout (internal/timers.js:535:17) at processTimers (internal/timers.js:479:7) test.notSameTopology .................................. 1/1 531ms must support tests in worker_threads .................. 1/1 npm ERR! Test failed. See above for more details. ```/cc @lundibundi