summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorCheahuychou Mao <cheahuychou.mao@mongodb.com>2020-03-25 13:59:23 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-03-27 16:38:39 +0000
commitbb67941a1ba9c04a58bc4cb74cfd02ec9f315024 (patch)
tree8f5a984cfc7a49a03af12519b93785d11845b424 /jstests
parentefbe46ec29d5a7ba6bd1786a5c9b47fd44b731d3 (diff)
downloadmongo-bb67941a1ba9c04a58bc4cb74cfd02ec9f315024.tar.gz
SERVER-47141 Make failpoint in NetworkInterfaceTL sort targets before constructing CommandState
Diffstat (limited to 'jstests')
-rw-r--r--jstests/sharding/hedged_reads.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/jstests/sharding/hedged_reads.js b/jstests/sharding/hedged_reads.js
index 9cf05016615..288f0d4d60a 100644
--- a/jstests/sharding/hedged_reads.js
+++ b/jstests/sharding/hedged_reads.js
@@ -94,15 +94,15 @@ st.rs0.nodes.forEach(function(conn) {
assert.commandWorked(
st.s.adminCommand({setParameter: 1, logComponentVerbosity: {network: {verbosity: 2}}}));
-jsTest.log("Verify the initial request is canceled when the hedged request responds first");
+jsTest.log("Verify that the initial request is canceled when the hedged request responds first");
try {
// Make the initial request block.
- setCommandDelay(sortedNodes[0], "find", kLargeTimeoutMS);
+ setCommandDelay(sortedNodes[0], "count", kLargeTimeoutMS);
const comment = "test_kill_initial_request_" + ObjectId();
assert.commandWorked(testDB.runCommand({
- find: collName,
- filter: {x: {$gte: 0}},
+ count: collName,
+ query: {x: {$gte: 0}},
$readPreference: {mode: "nearest"},
comment: comment
}));
@@ -117,18 +117,19 @@ try {
clearCommandDelay(sortedNodes[0]);
}
-jsTest.log("Verify the additional request is canceled when the initial request responds first");
+jsTest.log(
+ "Verify that the additional request is canceled when the initial request responds first");
try {
// Make the additional/hedged request block, set a large maxTimeMSForHedgedReads to prevent
// the remote host from killing the operation by itself.
assert.commandWorked(
st.s.adminCommand({setParameter: 1, maxTimeMSForHedgedReads: kLargeTimeoutMS}));
- setCommandDelay(sortedNodes[1], "find", kLargeTimeoutMS);
+ setCommandDelay(sortedNodes[1], "count", kLargeTimeoutMS);
const comment = "test_kill_additional_request_" + ObjectId();
assert.commandWorked(testDB.runCommand({
- find: collName,
- filter: {x: {$gte: 0}},
+ count: collName,
+ query: {x: {$gte: 0}},
$readPreference: {mode: "nearest"},
comment: comment
}));