@@ -55,7 +55,7 @@ void describe('LambdaFunctionLogStreamer', () => {
5555 classUnderTest . addLogGroups ( 'logFriendlyName2' , 'logGroupName2' ) ;
5656 classUnderTest . activate ( ) ;
5757 // wait just a bit to let the logs streamer run before deactivating it
58- await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) ) ;
58+ await new Promise ( ( resolve ) => setTimeout ( resolve , 1100 ) ) ;
5959 classUnderTest . pause ( ) ;
6060
6161 assert . strictEqual ( mockedWrite . mock . callCount ( ) , 4 ) ;
@@ -137,8 +137,9 @@ void describe('LambdaFunctionLogStreamer', () => {
137137
138138 classUnderTest . addLogGroups ( 'logFriendlyName1' , 'logGroupName1' ) ;
139139 classUnderTest . activate ( ) ;
140- // wait for just over two seconds to let the logs streamer get both the events before deactivating it
141- await new Promise ( ( resolve ) => setTimeout ( resolve , 2100 ) ) ;
140+ // wait for just 1 second to make the API calls and just over two seconds
141+ // to let the logs streamer get both the events before deactivating it
142+ await new Promise ( ( resolve ) => setTimeout ( resolve , 3100 ) ) ;
142143 classUnderTest . pause ( ) ;
143144
144145 assert . strictEqual ( mockedWrite . mock . callCount ( ) , 2 ) ;
@@ -204,7 +205,7 @@ void describe('LambdaFunctionLogStreamer', () => {
204205 classUnderTest . addLogGroups ( 'logFriendlyName1' , 'logGroupName1' ) ;
205206 classUnderTest . activate ( ) ;
206207 // wait just a bit to let the logs streamer run before deactivating it
207- await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) ) ;
208+ await new Promise ( ( resolve ) => setTimeout ( resolve , 1100 ) ) ;
208209 classUnderTest . pause ( ) ;
209210
210211 // 100 events + 1 informational for the user that 100 messages limit is hit
@@ -258,7 +259,7 @@ void describe('LambdaFunctionLogStreamer', () => {
258259 classUnderTest . addLogGroups ( 'logFriendlyName1' , 'logGroupName1' ) ;
259260 // activate it again and it should fetch the second event now
260261 classUnderTest . activate ( ) ;
261- await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) ) ;
262+ await new Promise ( ( resolve ) => setTimeout ( resolve , 600 ) ) ;
262263 classUnderTest . pause ( ) ;
263264
264265 assert . strictEqual ( mockedWrite . mock . callCount ( ) , 2 ) ;
0 commit comments