1
0
Fork 0

Feature/sort buckets dump agency allways (#8677)

This commit is contained in:
Wilfried Goesgens 2019-04-04 14:50:04 +02:00 committed by Jan
parent 06526b0a32
commit 9c0fb4a97e
2 changed files with 5 additions and 1 deletions

View File

@ -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 => {

View File

@ -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]);
} }