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 @@ -206,7 +206,7 @@ void timeMethodWhenCompletedExceptionally() {
206206 assertThat (registry .getMeters ()).isEmpty ();
207207
208208 guardedResult .complete (new IllegalStateException ("simulated" ));
209- catchThrowableOfType (completableFuture ::join , CompletionException .class );
209+ assertThatThrownBy (completableFuture ::join ). isInstanceOf ( CompletionException .class );
210210
211211 assertThat (registry .get ("call" )
212212 .tag ("class" , getClass ().getName () + "$AsyncTimedService" )
@@ -266,8 +266,8 @@ void timeMethodWithLongTaskTimerWhenCompletedExceptionally() {
266266 .longTaskTimer ()
267267 .activeTasks ()).isEqualTo (1 );
268268
269- guardedResult .complete (new NullPointerException ( ));
270- catchThrowableOfType (completableFuture ::join , CompletionException .class );
269+ guardedResult .complete (new IllegalStateException ( "simulated" ));
270+ assertThatThrownBy (completableFuture ::join ). isInstanceOf ( CompletionException .class );
271271
272272 assertThat (registry .get ("longCall" )
273273 .tag ("class" , getClass ().getName () + "$AsyncTimedService" )
@@ -341,7 +341,7 @@ void timeClassWithSkipPredicate() {
341341
342342 service .call ();
343343
344- assertThat (registry .find ( "call" ). timer ()). isNull ();
344+ assertThat (registry .getMeters ()). isEmpty ();
345345 }
346346
347347 @ Test
You can’t perform that action at this time.
0 commit comments