Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ void onSuccess_withChangesToReport_notifyCallbackOnMessage() {
requestService.sendRequest();

// Await for onMessage call
await().atMost(Duration.ofSeconds(1)).until(() -> callbacks.onMessageCalls.get() == 1);
await().atMost(Duration.ofSeconds(5)).until(() -> callbacks.onMessageCalls.get() == 1);

verify(callbacks).onMessage(MessageData.builder().setRemoteConfig(remoteConfig).build());
}
Expand Down Expand Up @@ -267,7 +267,7 @@ void verifyRemoteConfigStatusSetter() {
void onConnectionSuccessful_notifyCallback() {
initializeClient();

await().atMost(Duration.ofSeconds(1)).until(() -> callbacks.onConnectCalls.get() == 1);
await().atMost(Duration.ofSeconds(5)).until(() -> callbacks.onConnectCalls.get() == 1);

verify(callbacks).onConnect();
verify(callbacks, never()).onConnectFailed(any());
Expand Down Expand Up @@ -311,7 +311,7 @@ void onFailedResponse_withServerErrorData_notifyCallback() {
// Force request
requestService.sendRequest();

await().atMost(Duration.ofSeconds(1)).until(() -> callbacks.onErrorResponseCalls.get() == 1);
await().atMost(Duration.ofSeconds(5)).until(() -> callbacks.onErrorResponseCalls.get() == 1);

verify(callbacks).onErrorResponse(errorResponse);
verify(callbacks, never()).onMessage(any());
Expand Down Expand Up @@ -344,7 +344,7 @@ void whenServerProvidesNewInstanceUid_useIt() {
enqueueServerToAgentResponse(response);
requestService.sendRequest();

await().atMost(Duration.ofSeconds(1)).until(() -> state.instanceUid.get() != initialUid);
await().atMost(Duration.ofSeconds(5)).until(() -> state.instanceUid.get() != initialUid);

assertThat(state.instanceUid.get()).isEqualTo(serverProvidedUid);
}
Expand All @@ -359,7 +359,7 @@ private static AgentToServer getAgentToServerMessage(RecordedRequest request) {

private RecordedRequest takeRequest() {
try {
return server.takeRequest(1, TimeUnit.SECONDS);
return server.takeRequest(5, TimeUnit.SECONDS);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
Expand Down
Loading