@@ -209,7 +209,7 @@ void onSuccess_withChangesToReport_notifyCallbackOnMessage() {
209
209
requestService .sendRequest ();
210
210
211
211
// Await for onMessage call
212
- await ().atMost (Duration .ofSeconds (1 )).until (() -> callbacks .onMessageCalls .get () == 1 );
212
+ await ().atMost (Duration .ofSeconds (5 )).until (() -> callbacks .onMessageCalls .get () == 1 );
213
213
214
214
verify (callbacks ).onMessage (MessageData .builder ().setRemoteConfig (remoteConfig ).build ());
215
215
}
@@ -267,7 +267,7 @@ void verifyRemoteConfigStatusSetter() {
267
267
void onConnectionSuccessful_notifyCallback () {
268
268
initializeClient ();
269
269
270
- await ().atMost (Duration .ofSeconds (1 )).until (() -> callbacks .onConnectCalls .get () == 1 );
270
+ await ().atMost (Duration .ofSeconds (5 )).until (() -> callbacks .onConnectCalls .get () == 1 );
271
271
272
272
verify (callbacks ).onConnect ();
273
273
verify (callbacks , never ()).onConnectFailed (any ());
@@ -311,7 +311,7 @@ void onFailedResponse_withServerErrorData_notifyCallback() {
311
311
// Force request
312
312
requestService .sendRequest ();
313
313
314
- await ().atMost (Duration .ofSeconds (1 )).until (() -> callbacks .onErrorResponseCalls .get () == 1 );
314
+ await ().atMost (Duration .ofSeconds (5 )).until (() -> callbacks .onErrorResponseCalls .get () == 1 );
315
315
316
316
verify (callbacks ).onErrorResponse (errorResponse );
317
317
verify (callbacks , never ()).onMessage (any ());
@@ -344,7 +344,7 @@ void whenServerProvidesNewInstanceUid_useIt() {
344
344
enqueueServerToAgentResponse (response );
345
345
requestService .sendRequest ();
346
346
347
- await ().atMost (Duration .ofSeconds (1 )).until (() -> state .instanceUid .get () != initialUid );
347
+ await ().atMost (Duration .ofSeconds (5 )).until (() -> state .instanceUid .get () != initialUid );
348
348
349
349
assertThat (state .instanceUid .get ()).isEqualTo (serverProvidedUid );
350
350
}
@@ -359,7 +359,7 @@ private static AgentToServer getAgentToServerMessage(RecordedRequest request) {
359
359
360
360
private RecordedRequest takeRequest () {
361
361
try {
362
- return server .takeRequest (1 , TimeUnit .SECONDS );
362
+ return server .takeRequest (5 , TimeUnit .SECONDS );
363
363
} catch (InterruptedException e ) {
364
364
throw new RuntimeException (e );
365
365
}
0 commit comments