diff options
author | Vishnu Kaushik <vishnu.kaushik@mongodb.com> | 2021-07-15 18:47:24 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-07-20 03:33:00 +0000 |
commit | 3b293a78b0e24c5497464c3979daddfa0792bb55 (patch) | |
tree | 030d48166094581a8be7622b096cf9d24a818d97 /jstests/noPassthrough/max_time_ms.js | |
parent | faaca3440968820be133979d503bbe048eb69e4b (diff) | |
download | mongo-3b293a78b0e24c5497464c3979daddfa0792bb55.tar.gz |
SERVER-58566 Clean up remaining OP_QUERY code
Diffstat (limited to 'jstests/noPassthrough/max_time_ms.js')
-rw-r--r-- | jstests/noPassthrough/max_time_ms.js | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/jstests/noPassthrough/max_time_ms.js b/jstests/noPassthrough/max_time_ms.js index 050b85ac648..a780b21cbbb 100644 --- a/jstests/noPassthrough/max_time_ms.js +++ b/jstests/noPassthrough/max_time_ms.js @@ -320,20 +320,9 @@ function executeTest(db, isMongos) { ErrorCodes.BadValue); assert.commandFailedWithCode(db.runCommand({ping: 1, maxTimeMS: {}}), ErrorCodes.BadValue); - // Verify that the maxTimeMS command argument can be sent with $query-wrapped commands. - cursor = t.getDB().$cmd.find({ping: 1, maxTimeMS: 0}).limit(-1); - cursor._ensureSpecial(); - assert.eq(1, cursor.next().ok); - // Verify that the server rejects invalid command argument $maxTimeMS. - cursor = t.getDB().$cmd.find({ping: 1, $maxTimeMS: 0}).limit(-1); - cursor._ensureSpecial(); - assert.commandFailed(cursor.next()); - - // Verify that the $maxTimeMS query option can't be sent with $query-wrapped commands. - cursor = t.getDB().$cmd.find({ping: 1}).limit(-1).maxTimeMS(0); - cursor._ensureSpecial(); - assert.commandFailed(cursor.next()); + assert.commandFailed(t.getDB().runCommand({ping: 1, $maxTimeMS: 0}), + [ErrorCodes.InvalidOptions, 40415]); })(); // |