@@ -2003,7 +2003,7 @@ describe('Change Streams', function () {
20032003 } ) ;
20042004} ) ;
20052005
2006- describe ( 'ChangeStream resumability' , function ( ) {
2006+ describe . only ( 'ChangeStream resumability' , function ( ) {
20072007 let client : MongoClient ;
20082008 let collection : Collection ;
20092009 let changeStream : ChangeStream ;
@@ -2071,11 +2071,15 @@ describe('ChangeStream resumability', function () {
20712071 // so generating unique appname instead of cleaning for each test is an easier solution
20722072 appName = new UUID ( ) . toString ( ) ;
20732073
2074- client = this . configuration . newClient ( {
2075- monitorCommands : true ,
2076- serverSelectionTimeoutMS : 5_000 ,
2077- appName : appName
2078- } ) ;
2074+ client = this . configuration . newClient (
2075+ { } ,
2076+ {
2077+ monitorCommands : true ,
2078+ serverSelectionTimeoutMS : 5_000 ,
2079+ heartbeatFrequencyMS : 500 ,
2080+ appName : appName
2081+ }
2082+ ) ;
20792083 client . on ( 'commandStarted' , filterForCommands ( [ 'aggregate' ] , aggregateEvents ) ) ;
20802084 collection = client . db ( dbName ) . collection ( collectionName ) ;
20812085 } ) ;
@@ -2268,7 +2272,8 @@ describe('ChangeStream resumability', function () {
22682272 . db ( 'admin' )
22692273 . command ( { replSetFreeze : 0 } , { readPreference : ReadPreference . SECONDARY } ) ;
22702274 await client . db ( 'admin' ) . command ( { replSetStepDown : 30 , force : true } ) ;
2271- await sleep ( 1500 ) ;
2275+
2276+ await sleep ( 500 ) ;
22722277
22732278 const change = await changeStream . next ( ) ;
22742279 expect ( change ) . to . containSubset ( { operationType : 'insert' , fullDocument : { a : 1 } } ) ;
@@ -2621,7 +2626,8 @@ describe('ChangeStream resumability', function () {
26212626 . db ( 'admin' )
26222627 . command ( { replSetFreeze : 0 } , { readPreference : ReadPreference . SECONDARY } ) ;
26232628 await client . db ( 'admin' ) . command ( { replSetStepDown : 30 , force : true } ) ;
2624- await sleep ( 1500 ) ;
2629+
2630+ await sleep ( 500 ) ;
26252631
26262632 const change = await changeStream . tryNext ( ) ;
26272633 expect ( change ) . to . containSubset ( { operationType : 'insert' , fullDocument : { a : 1 } } ) ;
@@ -2798,7 +2804,8 @@ describe('ChangeStream resumability', function () {
27982804 . db ( 'admin' )
27992805 . command ( { replSetFreeze : 0 } , { readPreference : ReadPreference . SECONDARY } ) ;
28002806 await client . db ( 'admin' ) . command ( { replSetStepDown : 30 , force : true } ) ;
2801- await sleep ( 1500 ) ;
2807+
2808+ await sleep ( 500 ) ;
28022809
28032810 const change = await changeStreamIterator . next ( ) ;
28042811 expect ( change . value ) . to . containSubset ( {
0 commit comments