Skip to content

Commit 123b1cc

Browse files
authored
Increase timeout in opamp-client tests (#2079)
1 parent 7a645ed commit 123b1cc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

opamp-client/src/test/java/io/opentelemetry/opamp/client/internal/impl/OpampClientImplTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ void onSuccess_withChangesToReport_notifyCallbackOnMessage() {
209209
requestService.sendRequest();
210210

211211
// 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);
213213

214214
verify(callbacks).onMessage(MessageData.builder().setRemoteConfig(remoteConfig).build());
215215
}
@@ -267,7 +267,7 @@ void verifyRemoteConfigStatusSetter() {
267267
void onConnectionSuccessful_notifyCallback() {
268268
initializeClient();
269269

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

272272
verify(callbacks).onConnect();
273273
verify(callbacks, never()).onConnectFailed(any());
@@ -311,7 +311,7 @@ void onFailedResponse_withServerErrorData_notifyCallback() {
311311
// Force request
312312
requestService.sendRequest();
313313

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

316316
verify(callbacks).onErrorResponse(errorResponse);
317317
verify(callbacks, never()).onMessage(any());
@@ -344,7 +344,7 @@ void whenServerProvidesNewInstanceUid_useIt() {
344344
enqueueServerToAgentResponse(response);
345345
requestService.sendRequest();
346346

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

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

360360
private RecordedRequest takeRequest() {
361361
try {
362-
return server.takeRequest(1, TimeUnit.SECONDS);
362+
return server.takeRequest(5, TimeUnit.SECONDS);
363363
} catch (InterruptedException e) {
364364
throw new RuntimeException(e);
365365
}

0 commit comments

Comments
 (0)