diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-02-17 20:59:05 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-02-20 16:46:33 +0100 |
commit | fab06681236994c3ac77a1f259373fb9731ed6f7 (patch) | |
tree | 8af55ddb61d9c6516d2e542b169a0370535ca64a /test | |
parent | 7fc6e625311fb54e3e44508c9402745fd2ad5ab8 (diff) | |
download | android-node-v8-fab06681236994c3ac77a1f259373fb9731ed6f7.tar.gz android-node-v8-fab06681236994c3ac77a1f259373fb9731ed6f7.tar.bz2 android-node-v8-fab06681236994c3ac77a1f259373fb9731ed6f7.zip |
test: increase run time in test-worker-prof
This test has occasionally been failing on Windows since it
was added, with 6 instead of 15 ticks being seen.
Increasing the duration of the test should make it more reliable.
PR-URL: https://github.com/nodejs/node/pull/26172
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-worker-prof.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-worker-prof.js b/test/parallel/test-worker-prof.js index 5b0703f5f9..d4344a8057 100644 --- a/test/parallel/test-worker-prof.js +++ b/test/parallel/test-worker-prof.js @@ -15,7 +15,7 @@ if (!common.isMainThread) if (process.argv[2] === 'child') { const spin = ` const start = Date.now(); - while (Date.now() - start < 200); + while (Date.now() - start < 1000); `; new Worker(spin, { eval: true }); eval(spin); @@ -32,10 +32,10 @@ for (const logfile of logfiles) { const lines = fs.readFileSync(logfile, 'utf8').split('\n'); const ticks = lines.filter((line) => /^tick,/.test(line)).length; - // Test that at least 20 ticks have been recorded for both parent and child + // Test that at least 15 ticks have been recorded for both parent and child // threads. When not tracking Worker threads, only 1 or 2 ticks would // have been recorded. - // When running locally on x64 Linux, this number is usually at least 150 + // When running locally on x64 Linux, this number is usually at least 700 // for both threads, so 15 seems like a very safe threshold. assert(ticks >= 15, `${ticks} >= 15`); } |