summaryrefslogtreecommitdiff
path: root/jstests/core
diff options
context:
space:
mode:
authorIan Boros <ian.boros@mongodb.com>2022-08-19 19:19:39 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-08-22 16:05:09 +0000
commitc7da70b78f234eab15f1188a887fc3139d65f5ac (patch)
tree28f2e3173741957aab18847ba1f4478c51574e5a /jstests/core
parentce2913d15a9c5eb063ec2c41e0097370ce46c1b3 (diff)
downloadmongo-c7da70b78f234eab15f1188a887fc3139d65f5ac.tar.gz
SERVER-68521 Fix race in awaitdata_getmore.js
Diffstat (limited to 'jstests/core')
-rw-r--r--jstests/core/awaitdata_getmore_cmd.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/core/awaitdata_getmore_cmd.js b/jstests/core/awaitdata_getmore_cmd.js
index 8ad2634d27e..f2c766ca29b 100644
--- a/jstests/core/awaitdata_getmore_cmd.js
+++ b/jstests/core/awaitdata_getmore_cmd.js
@@ -171,7 +171,7 @@ const topology = DiscoverTopology.findConnectedNodes(db.getMongo());
if (topology.type !== Topology.kStandalone) {
const readConcern =
assert.commandWorked(db.adminCommand({getDefaultRWConcern: 1})).defaultReadConcern;
- if (readConcern.level == "majority") {
+ if (readConcern.level == "majority" || TestData.defaultReadConcernLevel === "majority") {
return;
}
}
@@ -214,7 +214,8 @@ assert.soon(() => db.await_data.findOne({_id: "signal parent shell"}) !== null);
// Now issue a getMore which will match the parallel shell's currentOp filter, signalling it to
// write a non-matching document into the collection. Confirm that we do not receive this
// document and that we subsequently time out.
-cmdRes = db.runCommand({getMore: cmdRes.cursor.id, collection: collName, maxTimeMS: 4000});
+cmdRes = db.runCommand(
+ {getMore: cmdRes.cursor.id, collection: collName, maxTimeMS: ReplSetTest.kDefaultTimeoutMS});
assert.commandWorked(cmdRes);
jsTestLog("Waiting insertion shell to terminate...");
assert.eq(insertshell(), 0);