From c2042c86e9723c8446cf2bd5d1817e58205d4eac Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Mon, 18 Mar 2019 15:14:08 +0100 Subject: [PATCH] abort testing if we fail to get the currently available collections during server startup (#8442) --- js/client/modules/@arangodb/test-utils.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/js/client/modules/@arangodb/test-utils.js b/js/client/modules/@arangodb/test-utils.js index b7bc9e52e3..d07981e2c4 100755 --- a/js/client/modules/@arangodb/test-utils.js +++ b/js/client/modules/@arangodb/test-utils.js @@ -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) {