Skip to content

Commit 007b2fa

Browse files
addaleaxrvagg
authored andcommittedFeb 28, 2019
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: #26172 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent a39cd45 commit 007b2fa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎test/parallel/test-worker-prof.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if (!common.isMainThread)
1515
if (process.argv[2] === 'child') {
1616
const spin = `
1717
const start = Date.now();
18-
while (Date.now() - start < 200);
18+
while (Date.now() - start < 1000);
1919
`;
2020
new Worker(spin, { eval: true });
2121
eval(spin);
@@ -32,10 +32,10 @@ for (const logfile of logfiles) {
3232
const lines = fs.readFileSync(logfile, 'utf8').split('\n');
3333
const ticks = lines.filter((line) => /^tick,/.test(line)).length;
3434

35-
// Test that at least 20 ticks have been recorded for both parent and child
35+
// Test that at least 15 ticks have been recorded for both parent and child
3636
// threads. When not tracking Worker threads, only 1 or 2 ticks would
3737
// have been recorded.
38-
// When running locally on x64 Linux, this number is usually at least 150
38+
// When running locally on x64 Linux, this number is usually at least 700
3939
// for both threads, so 15 seems like a very safe threshold.
4040
assert(ticks >= 15, `${ticks} >= 15`);
4141
}

0 commit comments

Comments
 (0)
Please sign in to comment.