1
0
Fork 0

Make testing.js more tolerant at shutdown (for high load).

This commit is contained in:
Max Neunhoeffer 2017-02-09 16:36:58 +01:00
parent 6be0c909b6
commit 273c6328c7
1 changed files with 6 additions and 2 deletions

View File

@ -1258,7 +1258,7 @@ function shutdownInstance (instanceInfo, options) {
let agentsKilled = false; let agentsKilled = false;
let nrAgents = n - nonagencies.length; let nrAgents = n - nonagencies.length;
let timeout = 60; let timeout = 666;
if (options.valgrind) { if (options.valgrind) {
timeout *= 10; timeout *= 10;
} }
@ -1286,7 +1286,11 @@ function shutdownInstance (instanceInfo, options) {
if (arangod.exitStatus.status === 'RUNNING') { if (arangod.exitStatus.status === 'RUNNING') {
if ((require('internal').time() - shutdownTime) > timeout) { let localTimeout = timeout;
if (arangod.role === 'agent') {
localTimeout = localTimeout + 60;
}
if ((require('internal').time() - shutdownTime) > localTimeout) {
print('forcefully terminating ' + yaml.safeDump(arangod.pid) + print('forcefully terminating ' + yaml.safeDump(arangod.pid) +
' after ' + timeout + 's grace period; marking crashy.'); ' after ' + timeout + 's grace period; marking crashy.');
serverCrashed = true; serverCrashed = true;