diff options
author | Michael Dawson <michael_dawson@ca.ibm.com> | 2015-09-15 17:54:20 -0400 |
---|---|---|
committer | Michael Dawson <michael_dawson@ca.ibm.com> | 2015-09-17 09:30:42 -0400 |
commit | 2853f9894fcecef5979d7ec2618c79760532253c (patch) | |
tree | e9ba4bfc23ac0d26ac06427cec52575157db7060 | |
parent | 1cfee8ebcb27e1fdac1d0445a32c285a89f0c9ae (diff) | |
download | android-node-v8-2853f9894fcecef5979d7ec2618c79760532253c.tar.gz android-node-v8-2853f9894fcecef5979d7ec2618c79760532253c.tar.bz2 android-node-v8-2853f9894fcecef5979d7ec2618c79760532253c.zip |
test: make cluster tests more time tolerant
Port https://github.com/nodejs/node-v0.x-archive/commit/f3f4e282168d243610f8e0241d633ff941c9c260
to master, updating to guard changes for AIX as requested
PR-URL: https://github.com/nodejs/node/pull/2891
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
-rw-r--r-- | test/parallel/test-cluster-master-error.js | 7 | ||||
-rw-r--r-- | test/parallel/test-cluster-master-kill.js | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/test/parallel/test-cluster-master-error.js b/test/parallel/test-cluster-master-error.js index e729963d7d..ae0f655bb8 100644 --- a/test/parallel/test-cluster-master-error.js +++ b/test/parallel/test-cluster-master-error.js @@ -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 diff --git a/test/parallel/test-cluster-master-kill.js b/test/parallel/test-cluster-master-kill.js index 89694ffd11..32f22b0f96 100644 --- a/test/parallel/test-cluster-master-kill.js +++ b/test/parallel/test-cluster-master-kill.js @@ -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() { |