11/* eslint-disable @typescript-eslint/no-empty-function */
2-
32import { type TestConfiguration } from '../../tools/runner/config' ;
43import { runScriptAndGetProcessInfo } from './resource_tracking_script_builder' ;
54
@@ -20,12 +19,14 @@ describe.skip('MongoClient.close() Integration', () => {
2019 config ,
2120 async function run ( { MongoClient, uri, expect } ) {
2221 const infiniteFile = '/dev/zero' ;
23- const client = new MongoClient ( uri , { tlsCertificateKeyFile : infiniteFile } ) ;
24- client . connect ( ) ;
22+ const client = new MongoClient ( uri , { tls : true , tlsCertificateKeyFile : infiniteFile } ) ;
23+ const connectPromise = client . connect ( ) ;
2524 expect ( process . getActiveResourcesInfo ( ) ) . to . include ( 'FSReqPromise' ) ;
2625 await client . close ( ) ;
2726 expect ( process . getActiveResourcesInfo ( ) ) . to . not . include ( 'FSReqPromise' ) ;
28- }
27+ const err = await connectPromise . catch ( e => e ) ;
28+ expect ( err ) . to . exist ;
29+ }
2930 ) ;
3031 } ) ;
3132 } ) ;
@@ -74,7 +75,7 @@ describe.skip('MongoClient.close() Integration', () => {
7475 describe ( 'Topology' , ( ) => {
7576 describe ( 'Node.js resource: Server Selection Timer' , ( ) => {
7677 describe ( 'after a Topology is created through client.connect()' , ( ) => {
77- it ( 'server selection timers are cleaned up by client.close()' , async ( ) => { } ) ;
78+ it . skip ( 'server selection timers are cleaned up by client.close()' , async ( ) => { } ) ;
7879 } ) ;
7980 } ) ;
8081
@@ -90,25 +91,25 @@ describe.skip('MongoClient.close() Integration', () => {
9091 describe ( 'MonitorInterval' , ( ) => {
9192 describe ( 'Node.js resource: Timer' , ( ) => {
9293 describe ( 'after a new monitor is made' , ( ) => {
93- it ( 'monitor interval timer is cleaned up by client.close()' , async ( ) => { } ) ;
94+ it . skip ( 'monitor interval timer is cleaned up by client.close()' , async ( ) => { } ) ;
9495 } ) ;
9596
9697 describe ( 'after a heartbeat fails' , ( ) => {
97- it ( 'the new monitor interval timer is cleaned up by client.close()' , async ( ) => { } ) ;
98+ it . skip ( 'the new monitor interval timer is cleaned up by client.close()' , async ( ) => { } ) ;
9899 } ) ;
99100 } ) ;
100101 } ) ;
101102
102103 describe ( 'Connection Monitoring' , ( ) => {
103104 describe ( 'Node.js resource: Socket' , ( ) => {
104- it ( 'no sockets remain after client.close()' , metadata , async function ( ) { } ) ;
105+ it . skip ( 'no sockets remain after client.close()' , metadata , async function ( ) { } ) ;
105106 } ) ;
106107 } ) ;
107108
108109 describe ( 'RTT Pinger' , ( ) => {
109110 describe ( 'Node.js resource: Timer' , ( ) => {
110111 describe ( 'after entering monitor streaming mode ' , ( ) => {
111- it ( 'the rtt pinger timer is cleaned up by client.close()' , async ( ) => {
112+ it . skip ( 'the rtt pinger timer is cleaned up by client.close()' , async ( ) => {
112113 // helloReply has a topologyVersion defined
113114 } ) ;
114115 } ) ;
@@ -117,7 +118,7 @@ describe.skip('MongoClient.close() Integration', () => {
117118 describe ( 'Connection' , ( ) => {
118119 describe ( 'Node.js resource: Socket' , ( ) => {
119120 describe ( 'when rtt monitoring is turned on' , ( ) => {
120- it ( 'no sockets remain after client.close()' , async ( ) => { } ) ;
121+ it . skip ( 'no sockets remain after client.close()' , async ( ) => { } ) ;
121122 } ) ;
122123 } ) ;
123124 } ) ;
@@ -127,25 +128,25 @@ describe.skip('MongoClient.close() Integration', () => {
127128 describe ( 'ConnectionPool' , ( ) => {
128129 describe ( 'Node.js resource: minPoolSize timer' , ( ) => {
129130 describe ( 'after new connection pool is created' , ( ) => {
130- it ( 'the minPoolSize timer is cleaned up by client.close()' , async ( ) => { } ) ;
131+ it . skip ( 'the minPoolSize timer is cleaned up by client.close()' , async ( ) => { } ) ;
131132 } ) ;
132133 } ) ;
133134
134135 describe ( 'Node.js resource: checkOut Timer' , ( ) => {
135136 // waitQueueTimeoutMS
136137 describe ( 'after new connection pool is created' , ( ) => {
137- it ( 'the wait queue timer is cleaned up by client.close()' , async ( ) => { } ) ;
138+ it . skip ( 'the wait queue timer is cleaned up by client.close()' , async ( ) => { } ) ;
138139 } ) ;
139140 } ) ;
140141
141142 describe ( 'Connection' , ( ) => {
142143 describe ( 'Node.js resource: Socket' , ( ) => {
143144 describe ( 'after a connection is checked out' , ( ) => {
144- it ( 'no sockets remain after client.close()' , async ( ) => { } ) ;
145+ it . skip ( 'no sockets remain after client.close()' , async ( ) => { } ) ;
145146 } ) ;
146147
147148 describe ( 'after a minPoolSize has been set on the ConnectionPool' , ( ) => {
148- it ( 'no sockets remain after client.close()' , async ( ) => { } ) ;
149+ it . skip ( 'no sockets remain after client.close()' , async ( ) => { } ) ;
149150 } ) ;
150151 } ) ;
151152 } ) ;
@@ -155,7 +156,7 @@ describe.skip('MongoClient.close() Integration', () => {
155156 describe ( 'SrvPoller' , ( ) => {
156157 describe ( 'Node.js resource: Timer' , ( ) => {
157158 describe ( 'after SRVPoller is created' , ( ) => {
158- it ( 'timers are cleaned up by client.close()' , async ( ) => { } ) ;
159+ it . skip ( 'timers are cleaned up by client.close()' , async ( ) => { } ) ;
159160 } ) ;
160161 } ) ;
161162 } ) ;
@@ -164,27 +165,27 @@ describe.skip('MongoClient.close() Integration', () => {
164165 describe ( 'ClientSession (Implicit)' , ( ) => {
165166 describe ( 'Server resource: LSID/ServerSession' , ( ) => {
166167 describe ( 'after a clientSession is implicitly created and used' , ( ) => {
167- it ( 'the server-side ServerSession is cleaned up by client.close()' , async function ( ) { } ) ;
168+ it . skip ( 'the server-side ServerSession is cleaned up by client.close()' , async function ( ) { } ) ;
168169 } ) ;
169170 } ) ;
170171
171172 describe ( 'Server resource: Transactions' , ( ) => {
172173 describe ( 'after a clientSession is implicitly created and used' , ( ) => {
173- it ( 'the server-side transaction is cleaned up by client.close()' , async function ( ) { } ) ;
174+ it . skip ( 'the server-side transaction is cleaned up by client.close()' , async function ( ) { } ) ;
174175 } ) ;
175176 } ) ;
176177 } ) ;
177178
178179 describe ( 'ClientSession (Explicit)' , ( ) => {
179180 describe ( 'Server resource: LSID/ServerSession' , ( ) => {
180181 describe ( 'after a clientSession is created and used' , ( ) => {
181- it ( 'the server-side ServerSession is cleaned up by client.close()' , async function ( ) { } ) ;
182+ it . skip ( 'the server-side ServerSession is cleaned up by client.close()' , async function ( ) { } ) ;
182183 } ) ;
183184 } ) ;
184185
185186 describe ( 'Server resource: Transactions' , ( ) => {
186187 describe ( 'after a clientSession is created and used' , ( ) => {
187- it ( 'the server-side transaction is cleaned up by client.close()' , async function ( ) { } ) ;
188+ it . skip ( 'the server-side transaction is cleaned up by client.close()' , async function ( ) { } ) ;
188189 } ) ;
189190 } ) ;
190191 } ) ;
@@ -287,14 +288,14 @@ describe.skip('MongoClient.close() Integration', () => {
287288 } ) ;
288289
289290 describe ( 'Node.js resource: Socket' , ( ) => {
290- it ( 'no sockets remain after client.close()' , metadata , async ( ) => { } ) ;
291+ it . skip ( 'no sockets remain after client.close()' , metadata , async ( ) => { } ) ;
291292 } ) ;
292293 } ) ;
293294 } ) ;
294295
295296 describe ( 'Server resource: Cursor' , ( ) => {
296297 describe ( 'after cursors are created' , ( ) => {
297- it ( 'all active server-side cursors are closed by client.close()' , async function ( ) { } ) ;
298+ it . skip ( 'all active server-side cursors are closed by client.close()' , async function ( ) { } ) ;
298299 } ) ;
299300 } ) ;
300301} ) ;
0 commit comments