diff options
author | ruslan.abdulkhalikov <ruslan.abdulkhalikov@mongodb.com> | 2021-03-20 23:06:24 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-23 00:54:19 +0000 |
commit | 20c01a9f4cd201662f9d67f3974fd85df0979186 (patch) | |
tree | 1a2ba807d9d375dbe74098b899e311b0a22b5c54 /jstests/noPassthrough | |
parent | a742fad3f4a9376a665fb359971f0457e5dcc101 (diff) | |
download | mongo-20c01a9f4cd201662f9d67f3974fd85df0979186.tar.gz |
SERVER-53083 collStats results depend on topology and option
Diffstat (limited to 'jstests/noPassthrough')
-rw-r--r-- | jstests/noPassthrough/agg_collstats_expr.js (renamed from jstests/noPassthrough/agg_collstats_count.js) | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/jstests/noPassthrough/agg_collstats_count.js b/jstests/noPassthrough/agg_collstats_expr.js index f60a47a03f0..502329e9a35 100644 --- a/jstests/noPassthrough/agg_collstats_count.js +++ b/jstests/noPassthrough/agg_collstats_expr.js @@ -171,7 +171,19 @@ const stDb = mongos.getDB(dbName); assert.commandFailedWithCode( stDb.runCommand( {aggregate: doesNotExistName, pipeline: [{"$collStats": {"count": {}}}], cursor: {}}), - 26); + ErrorCodes.NamespaceNotFound); + +assert.commandFailedWithCode( + stDb.runCommand( + {aggregate: doesNotExistName, pipeline: [{"$collStats": {"unknown": {}}}], cursor: {}}), + 40415); + +assert.commandFailedWithCode(stDb.runCommand({ + aggregate: doesNotExistName, + pipeline: [{"$collStats": {"queryExecStats": {}}}], + cursor: {} +}), + ErrorCodes.NamespaceNotFound); st.stop(); @@ -183,7 +195,7 @@ const rstDb = rst.getPrimary().getDB(dbName); assert.commandFailedWithCode( rstDb.runCommand( {aggregate: doesNotExistName, pipeline: [{"$collStats": {"count": {}}}], cursor: {}}), - 26); + ErrorCodes.NamespaceNotFound); rst.stopSet(); @@ -193,7 +205,19 @@ const standaloneDb = conn.getDB(dbName); assert.commandFailedWithCode( standaloneDb.runCommand( {aggregate: doesNotExistName, pipeline: [{"$collStats": {"count": {}}}], cursor: {}}), - 26); + ErrorCodes.NamespaceNotFound); + +assert.commandFailedWithCode( + standaloneDb.runCommand( + {aggregate: doesNotExistName, pipeline: [{"$collStats": {"unknown": {}}}], cursor: {}}), + 40415); + +assert.commandFailedWithCode(standaloneDb.runCommand({ + aggregate: doesNotExistName, + pipeline: [{"$collStats": {"queryExecStats": {}}}], + cursor: {} +}), + ErrorCodes.NamespaceNotFound); MongoRunner.stopMongod(conn); })(); |