nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
107.22k stars 29.4k forks source link

investigate flaky test-repl-history-navigation #36191

Open Trott opened 3 years ago

Trott commented 3 years ago

https://ci.nodejs.org/job/node-test-commit-linux-containered/nodes=ubi81_sharedlibs_openssl111fips_x64/23622/console

00:11:05 not ok 1837 parallel/test-repl-history-navigation
00:11:05   ---
00:11:05   duration_ms: 3.266
00:11:05   severity: fail
00:11:05   exitcode: 1
00:11:05   stack: |-
00:11:05     node:assert:107
00:11:05       throw new AssertionError(obj);
00:11:05       ^
00:11:05     
00:11:05     AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
00:11:05     + actual - expected ... Lines skipped
00:11:05     
00:11:05       [
00:11:05         '> ',
00:11:05     ...
00:11:05         ' ',
00:11:05         ']',
00:11:05     -   '\n// [ [length]: 0 ]',
00:11:05         '[ [length]: 0 ]\n',
00:11:05         '> '
00:11:05       ]
00:11:05         at REPLServer.<anonymous> (/home/iojs/build/workspace/node-test-commit-linux-containered/test/parallel/test-repl-history-navigation.js:584:16)
00:11:05         at Object.onceWrapper (node:events:482:28)
00:11:05         at REPLServer.emit (node:events:388:22)
00:11:05         at REPLServer.EventEmitter.emit (node:domain:470:12)
00:11:05         at REPLServer.Interface.close (node:readline:429:8)
00:11:05         at REPLServer.<anonymous> (node:repl:945:33)
00:11:05         at Object.onceWrapper (node:events:482:28)
00:11:05         at REPLServer.emit (node:events:376:20)
00:11:05         at REPLServer.EventEmitter.emit (node:domain:470:12)
00:11:05         at onwritten (node:internal/repl/history:143:14) {
00:11:05       generatedMessage: true,
00:11:05       code: 'ERR_ASSERTION',
00:11:05       actual: [
00:11:05         '> ',
00:11:05         '[',
00:11:05         ' ',
00:11:05         ']',
00:11:05         '\n// []',
00:11:05         '\n// []',
00:11:05         '\n// []',
00:11:05         '> util.inspect.replDefaults.showHidden',
00:11:05         '\n// false',
00:11:05         ' ',
00:11:05         '=',
00:11:05         ' ',
00:11:05         't',
00:11:05         'r',
00:11:05         'u',
00:11:05         'e',
00:11:05         'true\n',
00:11:05         '> ',
00:11:05         '[',
00:11:05         ' ',
00:11:05         ']',
00:11:05         '[ [length]: 0 ]\n',
00:11:05         '> '
00:11:05       ],
00:11:05       expected: [
00:11:05         '> ',
00:11:05         '[',
00:11:05         ' ',
00:11:05         ']',
00:11:05         '\n// []',
00:11:05         '\n// []',
00:11:05         '\n// []',
00:11:05         '> util.inspect.replDefaults.showHidden',
00:11:05         '\n// false',
00:11:05         ' ',
00:11:05         '=',
00:11:05         ' ',
00:11:05         't',
00:11:05         'r',
00:11:05         'u',
00:11:05         'e',
00:11:05         'true\n',
00:11:05         '> ',
00:11:05         '[',
00:11:05         ' ',
00:11:05         ']',
00:11:05         '\n// [ [length]: 0 ]',
00:11:05         '[ [length]: 0 ]\n',
00:11:05         '> '
00:11:05       ],
00:11:05       operator: 'deepStrictEqual'
00:11:05     }
00:11:05   ...
Trott commented 3 years ago

I am able to reproduce this locally with tools/test.py -j96 --repeat 96 test/parallel/test-repl-history-navigation.js.

Trott commented 3 years ago

/ping @BridgeAR

BridgeAR commented 3 years ago

The REPL limits it's time to evaluate previews to 333 ms. If the CPU is at it's capacity it can take longer and no preview would be generated in that case. That is likely the case here. Do we have a way to skip a test if the CPU is almost at it's limit?