summaryrefslogtreecommitdiff
path: root/jstests/concurrency/fsm_libs/runner.js
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2018-02-21 15:05:17 -0500
committerJonathan Abrahams <jonathan@mongodb.com>2018-02-21 15:06:35 -0500
commitcea72553a4a27e0fcc8fc3d925129783fdecb53c (patch)
tree769984dde94e297dace5edba786075b0b43eb3be /jstests/concurrency/fsm_libs/runner.js
parent2d23f45b457d156a5e5f97de4a811cfe44b4fb0a (diff)
downloadmongo-cea72553a4a27e0fcc8fc3d925129783fdecb53c.tar.gz
SERVER-32852 Capture data files on failures of the concurrency suite
Diffstat (limited to 'jstests/concurrency/fsm_libs/runner.js')
-rw-r--r--jstests/concurrency/fsm_libs/runner.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/jstests/concurrency/fsm_libs/runner.js b/jstests/concurrency/fsm_libs/runner.js
index 9dbabcb7c00..f205544f019 100644
--- a/jstests/concurrency/fsm_libs/runner.js
+++ b/jstests/concurrency/fsm_libs/runner.js
@@ -700,6 +700,7 @@ var runner = (function() {
var bgCleanup = [];
var errors = [];
var configServerData = [];
+ let activeException = false;
try {
prepareCollections(bgWorkloads, bgContext, cluster, clusterOptions, executionOptions);
@@ -759,6 +760,9 @@ var runner = (function() {
configServerData,
cleanupOptions);
});
+ } catch (err) {
+ activeException = true;
+ throw err;
} finally {
// Set a flag so background threads know to terminate.
bgThreadMgr.markAllForTermination();
@@ -790,8 +794,14 @@ var runner = (function() {
}
throwError(workloadErrors);
+ } catch (err) {
+ activeException = true;
+ throw err;
} finally {
- cluster.teardown();
+ // We preserve the data files when an FSM workload failed so that they can later be
+ // archived to S3.
+ const opts = activeException ? {noCleanData: true} : {};
+ cluster.teardown(opts);
}
}
}