mirror of
https://github.com/nodejs/node.git
synced 2025-12-28 07:50:41 +00:00
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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
ace8f6d60c
commit
be3fc1f729
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user