Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: spin longer on flaky platforms for test-worker-prof
Try spinning longer to get more ticks on flaky platforms
and reduce flakiness.
  • Loading branch information
joyeecheung committed Oct 29, 2025
commit a232240761e551962718065d0ec30cd9a0fa0658
8 changes: 7 additions & 1 deletion test/sequential/test-worker-prof.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@ if (process.argv[2] === 'child') {
console.log('parent prof file:', parentProf);

const { Worker } = require('worker_threads');
let spinTime = 1500;
if (common.isWindows || common.isMacOS || process.arch === 's390x') {
// Windows and MacOS tend to be flaky in CI, s390x as well.
// Give them more spins.
spinTime = 4500;
}
const w = new Worker(`
const { parentPort, workerData } = require('worker_threads');

const SPIN_MS = 1500;
const SPIN_MS = ${spinTime};
const start = Date.now();
parentPort.on('message', (data) => {
if (Date.now() - start < SPIN_MS) {
Expand Down
Loading