mirror of https://gitee.com/bigwinds/arangodb
Fix agency test startup. (#4643)
This commit is contained in:
parent
8c1eccff33
commit
897e31657d
|
@ -75,14 +75,24 @@ function agencyTestSuite () {
|
||||||
var request = require("@arangodb/request");
|
var request = require("@arangodb/request");
|
||||||
|
|
||||||
function findAgencyCompactionIntervals() {
|
function findAgencyCompactionIntervals() {
|
||||||
let res = request({url: agencyLeader + "/_api/agency/config",
|
for (let count = 0; count < 60; ++count) {
|
||||||
method: "GET", followRedirect: true});
|
let res = request({url: agencyLeader + "/_api/agency/config",
|
||||||
assertEqual(res.statusCode, 200);
|
method: "GET", followRedirect: true});
|
||||||
res.bodyParsed = JSON.parse(res.body);
|
if (res.statusCode === 200) {
|
||||||
return {
|
res.bodyParsed = JSON.parse(res.body);
|
||||||
compactionStepSize: res.bodyParsed.configuration["compaction step size"],
|
return {
|
||||||
compactionKeepSize: res.bodyParsed.configuration["compaction keep size"]
|
compactionStepSize: res.bodyParsed.configuration["compaction step size"],
|
||||||
};
|
compactionKeepSize: res.bodyParsed.configuration["compaction keep size"]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
require('console').topic("agency=warn", "Got status " + res.statusCode +
|
||||||
|
" from agency.");
|
||||||
|
require("internal").wait(1.0); // give the server another second
|
||||||
|
}
|
||||||
|
require('console').topic("agency=error",
|
||||||
|
"Giving up, agency did not boot successfully.");
|
||||||
|
assertEqual("apple", "orange");
|
||||||
|
// all is lost because agency did not get up and running in time
|
||||||
}
|
}
|
||||||
|
|
||||||
var compactionConfig = findAgencyCompactionIntervals();
|
var compactionConfig = findAgencyCompactionIntervals();
|
||||||
|
|
Loading…
Reference in New Issue