@@ -81,7 +81,7 @@ async function runUnifiedTest(
8181 ctx . skip ( ) ;
8282 }
8383
84- let utilClient ;
84+ let utilClient : MongoClient ;
8585 if ( ctx . configuration . isLoadBalanced ) {
8686 // The util client can always point at the single mongos LB frontend.
8787 utilClient = ctx . configuration . newClient ( ctx . configuration . singleMongosLoadBalancerUri ) ;
@@ -147,12 +147,13 @@ async function runUnifiedTest(
147147 writeConcern : { w : 'majority' }
148148 } ) ;
149149
150- trace ( 'listCollections' ) ;
151- const collectionList = await db . listCollections ( { name : collectionName } ) . toArray ( ) ;
152- if ( collectionList . length !== 0 ) {
153- trace ( 'drop' ) ;
154- expect ( await collection . drop ( ) ) . to . be . true ;
155- }
150+ trace ( 'drop' ) ;
151+ expect (
152+ await collection . drop ( {
153+ // Specifying any encrypted fields causes `collection.drop()` to drop the esoc and esc collections as well.
154+ encryptedFields : { }
155+ } )
156+ ) . to . be . true ;
156157 }
157158
158159 for ( const {
@@ -262,10 +263,10 @@ async function runUnifiedTest(
262263 expect ( testClient , `No client entity found with id ${ clientId } ` ) . to . exist ;
263264 const filteredTestClientLogs = expectedLogsForClient . ignoreMessages
264265 ? filterIgnoredMessages (
265- expectedLogsForClient . ignoreMessages ,
266- testClient ! . collectedLogs ,
267- entities
268- )
266+ expectedLogsForClient . ignoreMessages ,
267+ testClient ! . collectedLogs ,
268+ entities
269+ )
269270 : testClient ! . collectedLogs ;
270271 compareLogs (
271272 expectedLogsForClient . messages ,
0 commit comments