Skip to content

Commit 3bf42a5

Browse files
joyeecheungaduh95
authored andcommitted
test: spin longer on flaky platforms for test-worker-prof
Try spinning longer to get more ticks on flaky platforms and reduce flakiness. PR-URL: #60492 Refs: https://github.com/nodejs/reliability/blob/main/reports/2025-10-29.md Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 3446cf3 commit 3bf42a5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/sequential/test-worker-prof.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ if (process.argv[2] === 'child') {
1616
console.log('parent prof file:', parentProf);
1717

1818
const { Worker } = require('worker_threads');
19+
let spinTime = 1500;
20+
if (common.isWindows || common.isMacOS || process.arch === 's390x') {
21+
// Windows and MacOS tend to be flaky in CI, s390x as well.
22+
// Give them more spins.
23+
spinTime = 4500;
24+
}
1925
const w = new Worker(`
2026
const { parentPort, workerData } = require('worker_threads');
2127
22-
const SPIN_MS = 1500;
28+
const SPIN_MS = ${spinTime};
2329
const start = Date.now();
2430
parentPort.on('message', (data) => {
2531
if (Date.now() - start < SPIN_MS) {

0 commit comments

Comments
 (0)