summaryrefslogtreecommitdiff
path: root/src/mongo/db/dbdirectclient_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/dbdirectclient_test.cpp')
-rw-r--r--src/mongo/db/dbdirectclient_test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/dbdirectclient_test.cpp b/src/mongo/db/dbdirectclient_test.cpp
index 19ba4c35e86..ab15c3cd7fb 100644
--- a/src/mongo/db/dbdirectclient_test.cpp
+++ b/src/mongo/db/dbdirectclient_test.cpp
@@ -171,9 +171,9 @@ TEST_F(DBDirectClientTest, ExhaustQuery) {
ASSERT_FALSE(insertReply.getWriteErrors());
// The query should work even though exhaust mode is requested.
- int batchSize = 2;
- auto cursor = client.query_DEPRECATED(
- kNs, BSONObj{}, Query{}, 0 /*limit*/, 0 /*skip*/, nullptr, QueryOption_Exhaust, batchSize);
+ FindCommandRequest findCmd{kNs};
+ findCmd.setBatchSize(2);
+ auto cursor = client.find(std::move(findCmd), ReadPreferenceSetting{}, ExhaustMode::kOn);
ASSERT_EQ(cursor->itcount(), numDocs);
}