diff options
Diffstat (limited to 'jstests/core/collection_uuid_drop.js')
-rw-r--r-- | jstests/core/collection_uuid_drop.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jstests/core/collection_uuid_drop.js b/jstests/core/collection_uuid_drop.js index 276f591afdf..747a4b114ed 100644 --- a/jstests/core/collection_uuid_drop.js +++ b/jstests/core/collection_uuid_drop.js @@ -58,13 +58,14 @@ assert.eq(res.actualCollection, null); // The command 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({drop: coll2.getName(), collectionUUID: uuid}), ErrorCodes.CollectionUUIDMismatch); assert.eq(res.db, testDB.getName()); assert.eq(res.collectionUUID, uuid); assert.eq(res.expectedCollection, coll2.getName()); assert.eq(res.actualCollection, coll.getName()); +assert(!testDB.getCollectionNames().includes(coll2.getName())); // The command fails when the provided UUID corresponds to a different collection, even if the // provided namespace is a view. |