@@ -151,7 +151,7 @@ describe('Retryable Reads Spec Prose', () => {
151151 requires : { mongodb : '>=4.2' , topology : 'replicaset' }
152152 } ;
153153
154- describe ( 'Retryable Reads Caused by Overload Errors Are Retried on a Different Server' , ( ) => {
154+ describe . only ( 'Retryable Reads Caused by Overload Errors Are Retried on a Different Server' , ( ) => {
155155 let client : MongoClient ;
156156 const commandFailedEvents : CommandFailedEvent [ ] = [ ] ;
157157 const commandSucceededEvents : CommandSucceededEvent [ ] = [ ] ;
@@ -166,6 +166,8 @@ describe('Retryable Reads Spec Prose', () => {
166166 client . on ( 'commandFailed' , filterForCommands ( 'find' , commandFailedEvents ) ) ;
167167 client . on ( 'commandSucceeded' , filterForCommands ( 'find' , commandSucceededEvents ) ) ;
168168
169+ await client . connect ( ) ;
170+
169171 await client . db ( 'admin' ) . command ( {
170172 configureFailPoint : 'failCommand' ,
171173 mode : { times : 1 } ,
@@ -188,6 +190,8 @@ describe('Retryable Reads Spec Prose', () => {
188190 it ( 'retries on a different server when SystemOverloadedError' , TEST_METADATA , async ( ) => {
189191 await client . db ( 'test' ) . collection ( 'test' ) . find ( ) . toArray ( ) ;
190192
193+ console . log ( 'failed event:' , JSON . stringify ( commandFailedEvents [ 0 ] ) ) ;
194+
191195 expect ( commandFailedEvents ) . to . have . lengthOf ( 1 ) ;
192196 expect ( commandSucceededEvents ) . to . have . lengthOf ( 1 ) ;
193197 expect ( commandFailedEvents [ 0 ] . address ) . to . not . equal ( commandSucceededEvents [ 0 ] . address ) ;
@@ -209,6 +213,8 @@ describe('Retryable Reads Spec Prose', () => {
209213 client . on ( 'commandFailed' , filterForCommands ( 'find' , commandFailedEvents ) ) ;
210214 client . on ( 'commandSucceeded' , filterForCommands ( 'find' , commandSucceededEvents ) ) ;
211215
216+ await client . connect ( ) ;
217+
212218 await client . db ( 'admin' ) . command ( {
213219 configureFailPoint : 'failCommand' ,
214220 mode : { times : 1 } ,
0 commit comments