@@ -46,6 +46,7 @@ namespace mongo {
4646namespace {
4747
4848const NamespaceString kNss = NamespaceString(" test.throttleCursor" );
49+ const KeyString::Value kMinKeyString = KeyString::Value();
4950
5051class ThrottleCursorTest : public CatalogTestFixture {
5152private:
@@ -219,7 +220,7 @@ TEST_F(ThrottleCursorTest, TestSortedDataInterfaceThrottleCursorOff) {
219220 setMaxMbPerSec (0 );
220221 Date_t start = getTime ();
221222
222- ASSERT_TRUE (cursor.seek (opCtx, BSONObj () ));
223+ ASSERT_TRUE (cursor.seek (opCtx, kMinKeyString ));
223224 int numRecords = 1 ;
224225
225226 while (cursor.next (opCtx)) {
@@ -249,7 +250,7 @@ TEST_F(ThrottleCursorTest, TestSortedDataInterfaceThrottleCursorOn) {
249250 setMaxMbPerSec (1 );
250251 Date_t start = getTime ();
251252
252- ASSERT_TRUE (cursor.seek (opCtx, BSONObj () ));
253+ ASSERT_TRUE (cursor.seek (opCtx, kMinKeyString ));
253254 int numRecords = 1 ;
254255
255256 while (cursor.next (opCtx)) {
@@ -269,7 +270,7 @@ TEST_F(ThrottleCursorTest, TestSortedDataInterfaceThrottleCursorOn) {
269270 setMaxMbPerSec (5 );
270271 Date_t start = getTime ();
271272
272- ASSERT_TRUE (cursor.seek (opCtx, BSONObj () ));
273+ ASSERT_TRUE (cursor.seek (opCtx, kMinKeyString ));
273274 int numRecords = 1 ;
274275
275276 while (cursor.next (opCtx)) {
@@ -302,7 +303,7 @@ TEST_F(ThrottleCursorTest, TestMixedCursorsWithSharedThrottleOff) {
302303 setMaxMbPerSec (10 );
303304 Date_t start = getTime ();
304305
305- ASSERT_TRUE (indexCursor.seek (opCtx, BSONObj () ));
306+ ASSERT_TRUE (indexCursor.seek (opCtx, kMinKeyString ));
306307 int numRecords = 1 ;
307308
308309 while (indexCursor.next (opCtx)) {
@@ -345,7 +346,7 @@ TEST_F(ThrottleCursorTest, TestMixedCursorsWithSharedThrottleOn) {
345346 setMaxMbPerSec (2 );
346347 Date_t start = getTime ();
347348
348- ASSERT_TRUE (indexCursor.seek (opCtx, BSONObj () ));
349+ ASSERT_TRUE (indexCursor.seek (opCtx, kMinKeyString ));
349350 ASSERT_TRUE (recordCursor.seekExact (opCtx, RecordId (1 )));
350351 int numRecords = 2 ;
351352
@@ -367,7 +368,7 @@ TEST_F(ThrottleCursorTest, TestMixedCursorsWithSharedThrottleOn) {
367368 setMaxMbPerSec (5 );
368369 Date_t start = getTime ();
369370
370- ASSERT_TRUE (indexCursor.seek (opCtx, BSONObj () ));
371+ ASSERT_TRUE (indexCursor.seek (opCtx, kMinKeyString ));
371372 ASSERT_TRUE (recordCursor.seekExact (opCtx, RecordId (1 )));
372373 int numRecords = 2 ;
373374
0 commit comments