Skip to content

Commit dd12881

Browse files
committed
Simplifying tests for windows
1 parent a0438b9 commit dd12881

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import static org.assertj.core.api.Assertions.fail;
1010
import static org.awaitility.Awaitility.await;
1111
import static org.mockito.ArgumentMatchers.any;
12-
import static org.mockito.ArgumentMatchers.eq;
1312
import static org.mockito.Mockito.never;
1413
import static org.mockito.Mockito.spy;
1514
import static org.mockito.Mockito.verify;
@@ -327,16 +326,11 @@ void onFailedResponse_withServerErrorData_notifyCallback() {
327326
@Test
328327
void onConnectionFailed_notifyCallback() {
329328
awaitForStartRequest();
329+
Throwable throwable = new Throwable();
330330

331-
// Close mock server to get an exception on the next request
332-
server.close();
331+
client.onConnectionFailed(throwable);
333332

334-
// Force request
335-
requestService.sendRequest();
336-
337-
await().atMost(Duration.ofSeconds(1)).until(() -> callbacks.onConnectFailedCalls.get() == 1);
338-
339-
verify(callbacks).onConnectFailed(eq(client), any());
333+
verify(callbacks).onConnectFailed(client, throwable);
340334
}
341335

342336
@Test

0 commit comments

Comments
 (0)