@@ -55,7 +55,7 @@ void describe('LambdaFunctionLogStreamer', () => {
55
55
classUnderTest . addLogGroups ( 'logFriendlyName2' , 'logGroupName2' ) ;
56
56
classUnderTest . activate ( ) ;
57
57
// 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 ) ) ;
59
59
classUnderTest . pause ( ) ;
60
60
61
61
assert . strictEqual ( mockedWrite . mock . callCount ( ) , 4 ) ;
@@ -137,8 +137,9 @@ void describe('LambdaFunctionLogStreamer', () => {
137
137
138
138
classUnderTest . addLogGroups ( 'logFriendlyName1' , 'logGroupName1' ) ;
139
139
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 ) ) ;
142
143
classUnderTest . pause ( ) ;
143
144
144
145
assert . strictEqual ( mockedWrite . mock . callCount ( ) , 2 ) ;
@@ -204,7 +205,7 @@ void describe('LambdaFunctionLogStreamer', () => {
204
205
classUnderTest . addLogGroups ( 'logFriendlyName1' , 'logGroupName1' ) ;
205
206
classUnderTest . activate ( ) ;
206
207
// 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 ) ) ;
208
209
classUnderTest . pause ( ) ;
209
210
210
211
// 100 events + 1 informational for the user that 100 messages limit is hit
@@ -258,7 +259,7 @@ void describe('LambdaFunctionLogStreamer', () => {
258
259
classUnderTest . addLogGroups ( 'logFriendlyName1' , 'logGroupName1' ) ;
259
260
// activate it again and it should fetch the second event now
260
261
classUnderTest . activate ( ) ;
261
- await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) ) ;
262
+ await new Promise ( ( resolve ) => setTimeout ( resolve , 600 ) ) ;
262
263
classUnderTest . pause ( ) ;
263
264
264
265
assert . strictEqual ( mockedWrite . mock . callCount ( ) , 2 ) ;
0 commit comments