File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
micrometer-core/src/test/java/io/micrometer/core/aop Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ void timeMethodWhenCompletedExceptionally() {
201201 assertThat (registry .getMeters ()).isEmpty ();
202202
203203 guardedResult .complete (new IllegalStateException ("simulated" ));
204- catchThrowableOfType (completableFuture ::join , CompletionException .class );
204+ assertThatThrownBy (completableFuture ::join ). isInstanceOf ( CompletionException .class );
205205
206206 assertThat (registry .get ("call" )
207207 .tag ("class" , getClass ().getName () + "$AsyncTimedService" )
@@ -261,8 +261,8 @@ void timeMethodWithLongTaskTimerWhenCompletedExceptionally() {
261261 .longTaskTimer ()
262262 .activeTasks ()).isEqualTo (1 );
263263
264- guardedResult .complete (new NullPointerException ( ));
265- catchThrowableOfType (completableFuture ::join , CompletionException .class );
264+ guardedResult .complete (new IllegalStateException ( "simulated" ));
265+ assertThatThrownBy (completableFuture ::join ). isInstanceOf ( CompletionException .class );
266266
267267 assertThat (registry .get ("longCall" )
268268 .tag ("class" , getClass ().getName () + "$AsyncTimedService" )
@@ -336,7 +336,7 @@ void timeClassWithSkipPredicate() {
336336
337337 service .call ();
338338
339- assertThat (registry .find ( "call" ). timer ()). isNull ();
339+ assertThat (registry .getMeters ()). isEmpty ();
340340 }
341341
342342 @ Test
You can’t perform that action at this time.
0 commit comments