summaryrefslogtreecommitdiff
path: root/jstests/aggregation/collection_uuid_coll_stats_index_stats.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/aggregation/collection_uuid_coll_stats_index_stats.js')
-rw-r--r--jstests/aggregation/collection_uuid_coll_stats_index_stats.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/jstests/aggregation/collection_uuid_coll_stats_index_stats.js b/jstests/aggregation/collection_uuid_coll_stats_index_stats.js
index 5aa92524652..b0779a310f4 100644
--- a/jstests/aggregation/collection_uuid_coll_stats_index_stats.js
+++ b/jstests/aggregation/collection_uuid_coll_stats_index_stats.js
@@ -49,10 +49,11 @@ const testCommand = function(cmd, cmdObj) {
jsTestLog("The command '" + cmd +
"' fails when the provided UUID corresponds to a different collection, even if the " +
"provided namespace does not exist.");
- coll2.drop();
+ assert.commandWorked(testDB.runCommand({drop: coll2.getName()}));
res =
assert.commandFailedWithCode(testDB.runCommand(cmdObj), ErrorCodes.CollectionUUIDMismatch);
validateErrorResponse(res, testDB.getName(), uuid, coll2.getName(), coll.getName());
+ assert(!testDB.getCollectionNames().includes(coll2.getName()));
jsTestLog("The command '" + cmd + "' succeeds on view when no UUID is provided.");
const viewName = "view";