File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
opamp-client/src/test/java/io/opentelemetry/opamp/client/internal/impl Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 99import static org .assertj .core .api .Assertions .fail ;
1010import static org .awaitility .Awaitility .await ;
1111import static org .mockito .ArgumentMatchers .any ;
12- import static org .mockito .ArgumentMatchers .eq ;
1312import static org .mockito .Mockito .never ;
1413import static org .mockito .Mockito .spy ;
1514import 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
You can’t perform that action at this time.
0 commit comments