Skip to content

Commit

Permalink
fixup! fixup! test: fix flaky test-worker-prof
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott committed Feb 17, 2021
1 parent d8596e7 commit b690898
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/sequential/test-worker-prof.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if (process.argv[2] === 'child') {
const fs = require('fs');
const { Worker, parentPort } = require('worker_threads');
parentPort.on('message', (m) => {
if (counter++ === 10)
if (counter++ === 1024)
process.exit(0);
parentPort.postMessage(
fs.readFileSync(m.toString()).slice(0, 1024 * 1024));
Expand Down Expand Up @@ -73,7 +73,7 @@ if (process.argv[2] === '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 200
// When running locally, this number is usually around 200
// for both threads, so 15 seems like a very safe threshold.
assert(ticks >= 15, `${ticks} >= 15`);
}
Expand Down

0 comments on commit b690898

Please sign in to comment.