Skip to content

Commit 71b5d80

Browse files
mhdawsonFishrock123
authored andcommitted
test: make cluster tests more time tolerant
Port nodejs/node-v0.x-archive@f3f4e28 to master, updating to guard changes for AIX as requested PR-URL: #2891 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
1 parent 3e09dcf commit 71b5d80

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

test/parallel/test-cluster-master-error.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,12 @@ if (cluster.isWorker) {
9393
existMaster = !!code;
9494

9595
// Give the workers time to shut down
96-
setTimeout(checkWorkers, 200);
96+
var timeout = 200;
97+
if (common.isAix) {
98+
// AIX needs more time due to default exit performance
99+
timeout = 1000;
100+
}
101+
setTimeout(checkWorkers, timeout);
97102

98103
function checkWorkers() {
99104
// When master is dead all workers should be dead to

test/parallel/test-cluster-master-kill.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,14 @@ if (cluster.isWorker) {
5959
assert.equal(code, 0);
6060

6161
// check worker process status
62+
var timeout = 200;
63+
if (common.isAix) {
64+
// AIX needs more time due to default exit performance
65+
timeout = 1000;
66+
}
6267
setTimeout(function() {
6368
alive = isAlive(pid);
64-
}, 200);
69+
}, timeout);
6570
});
6671

6772
process.once('exit', function() {

0 commit comments

Comments
 (0)