summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuoxin Xu <ruoxin.xu@mongodb.com>2022-03-14 13:12:48 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-03-14 13:59:56 +0000
commit8b9df93c9e47f54e725dfff2f6bda5944e59a459 (patch)
tree846baaef875500d94e2e99265be5612c0ceef83d
parent960a4440e82f1fb274f0c4cb01dbda16c866cf88 (diff)
downloadmongo-8b9df93c9e47f54e725dfff2f6bda5944e59a459.tar.gz
SERVER-64463 Robustify count1.js test
-rw-r--r--jstests/sharding/count1.js5
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);