summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Boros <ian.boros@mongodb.com>2019-10-18 22:20:42 +0000
committerevergreen <evergreen@mongodb.com>2019-10-18 22:20:42 +0000
commite2588753f53e537132539ea10a6588f4055caa40 (patch)
treee3cb26d810cee739d367f3469789bcbff42e7632
parent5d6cfabf7cc4ba4d23c30b7d02ea79a1d664137d (diff)
downloadmongo-e2588753f53e537132539ea10a6588f4055caa40.tar.gz
SERVER-44106 change max time ms to not take locks while sleeping
-rw-r--r--jstests/core/max_time_ms.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/core/max_time_ms.js b/jstests/core/max_time_ms.js
index b8bb94b4e6f..ea993483352 100644
--- a/jstests/core/max_time_ms.js
+++ b/jstests/core/max_time_ms.js
@@ -193,7 +193,7 @@ assert.doesNotThrow(function() {
//
t.drop();
-res = t.getDB().adminCommand({sleep: 1, millis: 300, maxTimeMS: 100});
+res = t.getDB().adminCommand({sleep: 1, millis: 300, maxTimeMS: 100, lock: "none"});
assert(res.ok == 0 && res.code == ErrorCodes.MaxTimeMSExpired,
"expected sleep command to abort due to time limit, ok=" + res.ok + ", code=" + res.code);
@@ -203,7 +203,7 @@ assert(res.ok == 0 && res.code == ErrorCodes.MaxTimeMSExpired,
//
t.drop();
-res = t.getDB().adminCommand({sleep: 1, millis: 300, maxTimeMS: 10 * 1000});
+res = t.getDB().adminCommand({sleep: 1, millis: 300, maxTimeMS: 10 * 1000, lock: "none"});
assert(res.ok == 1,
"expected sleep command to not hit the time limit, ok=" + res.ok + ", code=" + res.code);
@@ -336,7 +336,7 @@ t.drop();
try {
assert.commandWorked(
t.getDB().adminCommand({configureFailPoint: "maxTimeNeverTimeOut", mode: "alwaysOn"}));
- res = t.getDB().adminCommand({sleep: 1, millis: 300, maxTimeMS: 100});
+ res = t.getDB().adminCommand({sleep: 1, millis: 300, maxTimeMS: 100, lock: "none"});
assert(res.ok == 1,
"expected command to trigger maxTimeNeverTimeOut fail point, ok=" + res.ok +
", code=" + res.code);
@@ -462,4 +462,4 @@ try {
} finally {
assert.commandWorked(
t.getDB().adminCommand({configureFailPoint: "maxTimeNeverTimeOut", mode: "off"}));
-} \ No newline at end of file
+}