summaryrefslogtreecommitdiff
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:53:50 -0400
commitf2ddc40c1bf5c654038a2702d63272af1b180a26 (patch)
tree3718c70091dd2f1631c7aa3384811b480133419e
parenta66fc7c4ab7f067573018621d5a8bc0326fcc687 (diff)
downloadmongo-r4.2.0-rc4.tar.gz
SERVER-42316 always join all threads in run_check_repl_dbhash_background.jsr4.2.0-rc4
-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));