-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: fix flaky test-benchmark-fs #17885
Conversation
Some benchmarks may return 0 operations with the new very short duration provided by the test program. Set environment variable to allow that.
Sample CI failure this will fix: https://ci.nodejs.org/job/node-test-commit-linux/15217/nodes=alpine36-container-x64/consoleText not ok 155 parallel/test-benchmark-fs
---
duration_ms: 15.866
severity: fail
stack: |-
fs/bench-readdir.js
fs/bench-readdir.js n=1: 58.80744384624206
fs/bench-readdirSync.js
fs/bench-readdirSync.js n=1: 2,460.6844147631223
fs/bench-realpath.js
fs/bench-realpath.js pathType="relative" n=1: 23.852785948152057
fs/bench-realpathSync.js
fs/bench-realpathSync.js pathType="relative" n=1: 2,926.6208357843784
fs/bench-stat.js
fs/bench-stat.js statType="fstat" n=1: 138.54832939809896
fs/bench-statSync.js
fs/bench-statSync.js statSyncType="fstatSync" n=1: 2,312.764377877946
fs/read-stream-throughput.js
fs/read-stream-throughput.js size=1 filesize=1024 encodingType="buf": 0.0003594309105535539
fs/readFileSync.js
fs/readFileSync.js n=1: 4,224.989120653015
fs/readfile.js
/home/iojs/build/workspace/node-test-commit-linux/nodes/alpine36-container-x64/benchmark/common.js:198
throw new Error('called end() with operation count <= 0');
^
Error: called end() with operation count <= 0
at Benchmark.end (/home/iojs/build/workspace/node-test-commit-linux/nodes/alpine36-container-x64/benchmark/common.js:198:11)
at Timeout._onTimeout (/home/iojs/build/workspace/node-test-commit-linux/nodes/alpine36-container-x64/benchmark/fs/readfile.js:30:11)
at ontimeout (timers.js:454:11)
at tryOnTimeout (timers.js:304:5)
at Timer.listOnTimeout (timers.js:264:5)
assert.js:43
throw new errors.AssertionError(obj);
^
AssertionError [ERR_ASSERTION]: 1 strictEqual 0
at ChildProcess.child.on (/home/iojs/build/workspace/node-test-commit-linux/nodes/alpine36-container-x64/test/common/benchmark.js:25:12)
at ChildProcess.emit (events.js:131:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woo :)
Can we do this for |
@apapirovski I'm not seeing how it's possible for |
By the way, this fixes one issue with the fs benchmark tests, but there remains a second issue: In fs/write-stream-throughput.js
/home/iojs/build/workspace/node-test-commit-aix/nodes/aix61-ppc64/benchmark/common.js:192
throw new Error('called end without start');
^
Error: called end without start
at Benchmark.end (/home/iojs/build/workspace/node-test-commit-aix/nodes/aix61-ppc64/benchmark/common.js:192:11)
at WriteStream.<anonymous> (/home/iojs/build/workspace/node-test-commit-aix/nodes/aix61-ppc64/benchmark/fs/write-stream-throughput.js:57:11)
at WriteStream.emit (events.js:136:15)
at finishMaybe (_stream_writable.js:633:14)
at endWritable (_stream_writable.js:641:3)
at WriteStream.Writable.end (_stream_writable.js:583:5)
at Timeout._onTimeout (/home/iojs/build/workspace/node-test-commit-aix/nodes/aix61-ppc64/benchmark/fs/write-stream-throughput.js:46:7)
at ontimeout (timers.js:454:11)
at tryOnTimeout (timers.js:304:5)
at Timer.listOnTimeout (timers.js:264:5)
assert.js:43
throw new errors.AssertionError(obj);
^ |
Some benchmarks may return 0 operations with the new very short duration provided by the test program. Set environment variable to allow that. PR-URL: nodejs#17885 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com>
Landed in 9c00f07 |
Some benchmarks may return 0 operations with the new very short duration provided by the test program. Set environment variable to allow that. PR-URL: #17885 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com>
Some benchmarks may return 0 operations with the new very short duration provided by the test program. Set environment variable to allow that. PR-URL: #17885 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com>
Some benchmarks may return 0 operations with the new very short duration provided by the test program. Set environment variable to allow that. PR-URL: #17885 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com>
Some benchmarks may return 0 operations with the new very short duration provided by the test program. Set environment variable to allow that. PR-URL: #17885 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com>
Some benchmarks may return 0 operations with the new very short duration
provided by the test program. Set environment variable to allow that.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test benchmark fs