Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: make cluster tests more time tolerant #2891

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion test/parallel/test-cluster-master-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ if (cluster.isWorker) {
existMaster = !!code;

// Give the workers time to shut down
setTimeout(checkWorkers, 200);
var timeout = 200;
if (common.isAix) {
// AIX needs more time due to default exit performance
timeout = 1000;
}
setTimeout(checkWorkers, timeout);

function checkWorkers() {
// When master is dead all workers should be dead to
Expand Down
7 changes: 6 additions & 1 deletion test/parallel/test-cluster-master-kill.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,14 @@ if (cluster.isWorker) {
assert.equal(code, 0);

// check worker process status
var timeout = 200;
if (common.isAix) {
// AIX needs more time due to default exit performance
timeout = 1000;
}
setTimeout(function() {
alive = isAlive(pid);
}, 200);
}, timeout);
});

process.once('exit', function() {
Expand Down