@@ -1820,7 +1820,7 @@ describe('Change Streams', function () {
18201820 } ) ;
18211821} ) ;
18221822
1823- describe ( 'ChangeStream resumability' , function ( ) {
1823+ describe . only ( 'ChangeStream resumability' , function ( ) {
18241824 let client : MongoClient ;
18251825 let collection : Collection ;
18261826 let changeStream : ChangeStream ;
@@ -1888,11 +1888,15 @@ describe('ChangeStream resumability', function () {
18881888 // so generating unique appname instead of cleaning for each test is an easier solution
18891889 appName = new UUID ( ) . toString ( ) ;
18901890
1891- client = this . configuration . newClient ( {
1892- monitorCommands : true ,
1893- serverSelectionTimeoutMS : 5_000 ,
1894- appName : appName
1895- } ) ;
1891+ client = this . configuration . newClient (
1892+ { } ,
1893+ {
1894+ monitorCommands : true ,
1895+ serverSelectionTimeoutMS : 5_000 ,
1896+ heartbeatFrequencyMS : 500 ,
1897+ appName : appName
1898+ }
1899+ ) ;
18961900 client . on ( 'commandStarted' , filterForCommands ( [ 'aggregate' ] , aggregateEvents ) ) ;
18971901 collection = client . db ( dbName ) . collection ( collectionName ) ;
18981902 } ) ;
@@ -2085,7 +2089,8 @@ describe('ChangeStream resumability', function () {
20852089 . db ( 'admin' )
20862090 . command ( { replSetFreeze : 0 } , { readPreference : ReadPreference . SECONDARY } ) ;
20872091 await client . db ( 'admin' ) . command ( { replSetStepDown : 30 , force : true } ) ;
2088- await sleep ( 1500 ) ;
2092+
2093+ await sleep ( 500 ) ;
20892094
20902095 const change = await changeStream . next ( ) ;
20912096 expect ( change ) . to . containSubset ( { operationType : 'insert' , fullDocument : { a : 1 } } ) ;
@@ -2438,7 +2443,8 @@ describe('ChangeStream resumability', function () {
24382443 . db ( 'admin' )
24392444 . command ( { replSetFreeze : 0 } , { readPreference : ReadPreference . SECONDARY } ) ;
24402445 await client . db ( 'admin' ) . command ( { replSetStepDown : 30 , force : true } ) ;
2441- await sleep ( 1500 ) ;
2446+
2447+ await sleep ( 500 ) ;
24422448
24432449 const change = await changeStream . tryNext ( ) ;
24442450 expect ( change ) . to . containSubset ( { operationType : 'insert' , fullDocument : { a : 1 } } ) ;
@@ -2615,7 +2621,8 @@ describe('ChangeStream resumability', function () {
26152621 . db ( 'admin' )
26162622 . command ( { replSetFreeze : 0 } , { readPreference : ReadPreference . SECONDARY } ) ;
26172623 await client . db ( 'admin' ) . command ( { replSetStepDown : 30 , force : true } ) ;
2618- await sleep ( 1500 ) ;
2624+
2625+ await sleep ( 500 ) ;
26192626
26202627 const change = await changeStreamIterator . next ( ) ;
26212628 expect ( change . value ) . to . containSubset ( {
0 commit comments