Skip to content

Commit d8596e7

Browse files
committed
fixup! test: fix flaky test-worker-prof
1 parent 3fd9375 commit d8596e7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/sequential/test-worker-prof.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ if (process.argv[2] === 'child') {
2525
parentPort.on('message', (m) => {
2626
if (counter++ === 10)
2727
process.exit(0);
28-
parentPort.postMessage(
29-
fs.readFileSync(m.toString()).slice(0, 1024 * 1024));
28+
parentPort.postMessage(
29+
fs.readFileSync(m.toString()).slice(0, 1024 * 1024));
3030
});
3131
`;
3232

3333
const { Worker } = require('worker_threads');
3434
const w = new Worker(pingpong, { eval: true });
3535
w.on('message', (m) => {
36-
w.postMessage(process.execPath);
36+
w.postMessage(__filename);
3737
});
3838

3939
w.on('exit', common.mustCall(() => {
@@ -46,10 +46,10 @@ if (process.argv[2] === 'child') {
4646
}
4747
process.exit(0);
4848
}));
49-
w.postMessage(process.execPath);
49+
w.postMessage(__filename);
5050
} else {
5151
tmpdir.refresh();
52-
const timeout = common.platformTimeout(60_000);
52+
const timeout = common.platformTimeout(30_000);
5353
const spawnResult = spawnSync(
5454
process.execPath, ['--prof', __filename, 'child'],
5555
{ cwd: tmpdir.path, encoding: 'utf8', timeout });

0 commit comments

Comments
 (0)