summaryrefslogtreecommitdiff
path: root/jstests/core/collection_uuid_find.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/collection_uuid_find.js')
-rw-r--r--jstests/core/collection_uuid_find.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/jstests/core/collection_uuid_find.js b/jstests/core/collection_uuid_find.js
index f3ce69f0e34..93d6d011266 100644
--- a/jstests/core/collection_uuid_find.js
+++ b/jstests/core/collection_uuid_find.js
@@ -56,13 +56,15 @@ 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.commandWorkedOrFailedWithCode(testDB.runCommand({drop: coll2.getName()}),
+ ErrorCodes.NamespaceNotFound);
res = assert.commandFailedWithCode(testDB.runCommand({find: 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.