From bf3f68ee2653f0a6597fec56f946a32c0be3cb15 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Thu, 6 Apr 2017 11:43:11 +0200 Subject: [PATCH] BUGFIX: when we don't start the server we mustn't try to attempt to clean up its db directories --- js/client/modules/@arangodb/testing.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/js/client/modules/@arangodb/testing.js b/js/client/modules/@arangodb/testing.js index 841d30feb4..2f8857ccd4 100644 --- a/js/client/modules/@arangodb/testing.js +++ b/js/client/modules/@arangodb/testing.js @@ -500,13 +500,17 @@ function unitTest (cases, options) { results.status = globalStatus; results.crashed = pu.serverCrashed; - if (globalStatus && !pu.serverCrashed) { - pu.cleanupDBDirectories(options); + if (options.server === undefined) { + if (globalStatus && !pu.serverCrashed) { + pu.cleanupDBDirectories(options); + } else { + print('not cleaning up as some tests weren\'t successful:\n' + + pu.getCleanupDBDirectories); + } } else { - print('not cleaning up as some tests weren\'t successful:\n' + - pu.getCleanupDBDirectories); + print("not cleaning up since we didn't start the server ourselves\n"); } - + try { yaml.safeDump(JSON.parse(JSON.stringify(results))); } catch (err) {