1
0
Fork 0

abort testing if we fail to get the currently available collections during server startup (#8442)

This commit is contained in:
Wilfried Goesgens 2019-03-18 15:14:08 +01:00 committed by Jan
parent 888a20bcf7
commit c2042c86e9
1 changed files with 14 additions and 3 deletions

View File

@ -176,9 +176,20 @@ function performTests (options, testList, testname, runFn, serverOptions, startS
let collectionsBefore = [];
if (!serverDead) {
db._collections().forEach(collection => {
collectionsBefore.push(collection._name);
});
try {
db._collections().forEach(collection => {
collectionsBefore.push(collection._name);
});
}
catch (x) {
results[te] = {
status: false,
message: 'failed to fetch the currently available collections: ' + x.message + '. Original test status: ' + JSON.stringify(results[te])
};
continueTesting = false;
serverDead = true;
first = false;
}
}
while (first || options.loopEternal) {
if (!continueTesting) {