summaryrefslogtreecommitdiff
path: root/jstests/hooks
diff options
context:
space:
mode:
authorGabriel Russell <gabriel.russell@mongodb.com>2019-07-22 13:52:42 -0400
committerGabriel Russell <gabriel.russell@mongodb.com>2019-07-23 15:52:26 -0400
commitf79c017612cba9db58ca96c74d787678e0660c43 (patch)
tree478810022f4ffcd37548ffd450ced16893565f1d /jstests/hooks
parent737bfd75a92d121313bedadf4d85534b529b9ddf (diff)
downloadmongo-f79c017612cba9db58ca96c74d787678e0660c43.tar.gz
SERVER-42316 always join all threads in run_check_repl_dbhash_background.js
Diffstat (limited to 'jstests/hooks')
-rw-r--r--jstests/hooks/run_check_repl_dbhash_background.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/jstests/hooks/run_check_repl_dbhash_background.js b/jstests/hooks/run_check_repl_dbhash_background.js
index 30a7828ec28..5d7e2698780 100644
--- a/jstests/hooks/run_check_repl_dbhash_background.js
+++ b/jstests/hooks/run_check_repl_dbhash_background.js
@@ -470,10 +470,20 @@
}
} finally {
// Wait for each thread to finish. Throw an error if any thread fails.
+ let exception;
const returnData = threads.map(thread => {
- thread.join();
- return thread.returnData();
+ try {
+ thread.join();
+ return thread.returnData();
+ } catch (e) {
+ if (!exception) {
+ exception = e;
+ }
+ }
});
+ if (exception) {
+ throw exception;
+ }
returnData.forEach(res => {
assert.commandWorked(res, () => 'data consistency checks failed: ' + tojson(res));