1
0
Fork 0

attempt to fix load_balancing tests in slow test environments (#9627)

This commit is contained in:
Jan 2019-08-02 14:18:50 +02:00 committed by GitHub
parent f95281471c
commit d64ad7ac0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 6 deletions

View File

@ -182,10 +182,18 @@ function AsyncAuthSuite () {
require('internal').wait(11.0, false);
url = `${baseJobUrl}/${jobId}`;
result = sendRequest(users[0], 'PUT', url, {}, {}, false);
let tries = 0;
while (++tries < 30) {
result = sendRequest(users[0], 'PUT', url, {}, {}, false);
assertFalse(result === undefined || result === {});
assertFalse(result.body.error);
assertFalse(result === undefined || result === {});
assertFalse(result.body.error);
if (result.status === 201) {
// jobs API may return HTTP 204 until job is ready
break;
}
require("internal").wait(1.0, false);
}
assertEqual(result.status, 201);
assertFalse(result.headers["x-arango-async-id"] === undefined);
assertEqual(result.body.result.length, 1);

View File

@ -155,10 +155,18 @@ function AsyncSuite () {
require('internal').wait(11.0, false);
url = `${baseJobUrl}/${jobId}`;
result = sendRequest('PUT', url, {}, {}, false);
let tries = 0;
while (++tries < 30) {
result = sendRequest('PUT', url, {}, {}, false);
assertFalse(result === undefined || result === {});
assertFalse(result.body.error);
assertFalse(result === undefined || result === {});
assertFalse(result.body.error);
if (result.status === 201) {
// jobs API may return HTTP 204 until job is ready
break;
}
require("internal").wait(1.0, false);
}
assertEqual(result.status, 201);
assertFalse(result.headers["x-arango-async-id"] === undefined);
assertEqual(result.body.result.length, 1);