diff options
Diffstat (limited to 'jstests/core/collection_uuid_index_commands.js')
-rw-r--r-- | jstests/core/collection_uuid_index_commands.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jstests/core/collection_uuid_index_commands.js b/jstests/core/collection_uuid_index_commands.js index a323859144c..76ee83d8336 100644 --- a/jstests/core/collection_uuid_index_commands.js +++ b/jstests/core/collection_uuid_index_commands.js @@ -82,10 +82,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("Only collections in the same database are specified by actualCollection."); const otherDB = testDB.getSiblingDB(testDB.getName() + '_2'); |