mirror of https://gitee.com/bigwinds/arangodb
Feature/sort buckets dump agency allways (#8677)
This commit is contained in:
parent
06526b0a32
commit
9c0fb4a97e
|
@ -838,7 +838,6 @@ function dumpAgency(instanceInfo, options) {
|
||||||
let agencyReply = download(arangod.url + path, method === 'POST' ? '[["/"]]' : '', opts);
|
let agencyReply = download(arangod.url + path, method === 'POST' ? '[["/"]]' : '', opts);
|
||||||
if (agencyReply.code === 200) {
|
if (agencyReply.code === 200) {
|
||||||
let agencyValue = JSON.parse(agencyReply.body);
|
let agencyValue = JSON.parse(agencyReply.body);
|
||||||
print(JSON.stringify(agencyValue));
|
|
||||||
fs.write(fs.join(options.testOutputDirectory, fn + '_' + arangod.pid + ".json"), JSON.stringify(agencyValue, null, 2));
|
fs.write(fs.join(options.testOutputDirectory, fn + '_' + arangod.pid + ".json"), JSON.stringify(agencyValue, null, 2));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -1152,6 +1151,9 @@ function shutdownInstance (instanceInfo, options, forceTerminate) {
|
||||||
timeout *= 2;
|
timeout *= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((toShutdown.length > 0) && (options.cluster === true)) {
|
||||||
|
dumpAgency(instanceInfo, options);
|
||||||
|
}
|
||||||
var shutdownTime = internal.time();
|
var shutdownTime = internal.time();
|
||||||
while (toShutdown.length > 0) {
|
while (toShutdown.length > 0) {
|
||||||
toShutdown = toShutdown.filter(arangod => {
|
toShutdown = toShutdown.filter(arangod => {
|
||||||
|
|
|
@ -528,6 +528,8 @@ function splitBuckets (options, cases) {
|
||||||
|
|
||||||
let result = [];
|
let result = [];
|
||||||
|
|
||||||
|
cases.sort();
|
||||||
|
|
||||||
for (let i = s % m; i < cases.length; i = i + r) {
|
for (let i = s % m; i < cases.length; i = i + r) {
|
||||||
result.push(cases[i]);
|
result.push(cases[i]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue