Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 007b2fa

Browse filesBrowse files
addaleaxrvagg
authored andcommitted
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 <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>
1 parent a39cd45 commit 007b2fa
Copy full SHA for 007b2fa

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-worker-prof.js
+3-3Lines changed: 3 additions & 3 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.