diff options
author | Ruoxin Xu <ruoxin.xu@mongodb.com> | 2022-03-14 13:12:48 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-14 13:59:56 +0000 |
commit | 8b9df93c9e47f54e725dfff2f6bda5944e59a459 (patch) | |
tree | 846baaef875500d94e2e99265be5612c0ceef83d | |
parent | 960a4440e82f1fb274f0c4cb01dbda16c866cf88 (diff) | |
download | mongo-8b9df93c9e47f54e725dfff2f6bda5944e59a459.tar.gz |
SERVER-64463 Robustify count1.js test
-rw-r--r-- | jstests/sharding/count1.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/sharding/count1.js b/jstests/sharding/count1.js index ce9ce017692..b820a436e8e 100644 --- a/jstests/sharding/count1.js +++ b/jstests/sharding/count1.js @@ -146,11 +146,12 @@ assert.commandFailedWithCode(db.runCommand({count: 'foo', query: {$c: {$abc: 3}} ErrorCodes.BadValue); // ii. Negative skip values should return error. -assert.commandFailedWithCode(db.runCommand({count: 'foo', skip: -2}), ErrorCodes.FailedToParse); +assert.commandFailedWithCode(db.runCommand({count: 'foo', skip: -2}), + [ErrorCodes.FailedToParse, 51024]); // iii. Negative skip values with positive limit should return error. assert.commandFailedWithCode(db.runCommand({count: 'foo', skip: -2, limit: 1}), - ErrorCodes.FailedToParse); + [ErrorCodes.FailedToParse, 51024]); // iv. Unknown options should return error. assert.commandFailedWithCode(db.runCommand({count: 'foo', random: true}), 40415); |