summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilena Ivanova <milena.ivanova@mongodb.com>2021-09-24 09:30:06 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-11-19 15:31:33 +0000
commitac1f79eadf6c725a99a959885468dbdbb7c15ce4 (patch)
tree082a2b602332a1656337b55c329ec29b84437fa8
parentb23f0375680f57bf279e70d2fb3f76052ffbb03f (diff)
downloadmongo-ac1f79eadf6c725a99a959885468dbdbb7c15ce4.tar.gz
SERVER-59879 Adjust maxTimeMS value to allow for slower execution in the parallel test suite
(cherry picked from commit b44f2b07934dc9cd7ca68e774152045126e0167e)
-rw-r--r--jstests/core/explain_shell_helpers.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/jstests/core/explain_shell_helpers.js b/jstests/core/explain_shell_helpers.js
index ed9cb27d6bd..2df074f8d9f 100644
--- a/jstests/core/explain_shell_helpers.js
+++ b/jstests/core/explain_shell_helpers.js
@@ -174,9 +174,11 @@ explain = t.find().showDiskLoc().explain();
assert.commandWorked(explain);
// .maxTimeMS()
-explain = t.explain().find().maxTimeMS(200).finish();
+// Provide longer maxTime when the test runs in suites which can affect query execution time.
+const numConn = db.serverStatus().connections.current;
+explain = t.explain().find().maxTimeMS(200 * numConn).finish();
assert.commandWorked(explain);
-explain = t.find().maxTimeMS(200).explain();
+explain = t.find().maxTimeMS(200 * numConn).explain();
assert.commandWorked(explain);
// .readPref()