diff --git a/micrometer-tracing-bridges/micrometer-tracing-bridge-brave/src/test/java/io/micrometer/tracing/brave/contextpropagation/ScopesTests.java b/micrometer-tracing-bridges/micrometer-tracing-bridge-brave/src/test/java/io/micrometer/tracing/brave/contextpropagation/ScopesTests.java index a47c798f..0428d6d9 100644 --- a/micrometer-tracing-bridges/micrometer-tracing-bridge-brave/src/test/java/io/micrometer/tracing/brave/contextpropagation/ScopesTests.java +++ b/micrometer-tracing-bridges/micrometer-tracing-bridge-brave/src/test/java/io/micrometer/tracing/brave/contextpropagation/ScopesTests.java @@ -196,7 +196,9 @@ void should_open_and_close_scopes_with_reactor_multithreaded() { } else { try { - latch.await(1, TimeUnit.SECONDS); + if (!latch.await(1, TimeUnit.SECONDS)) { + throw new RuntimeException("Waiting for the latch timed out!"); + } } catch (InterruptedException e) { // ignore @@ -253,7 +255,9 @@ void should_open_and_close_scopes_with_reactor_multithreaded() { Observation obs4 = Observation.start("4", observationRegistry); try (Observation.Scope scope4 = obs4.openScope()) { logger.info("FRESH SPAN AFTER [{}]", tracer.currentSpan()); - cleanupLatch.await(1, TimeUnit.SECONDS); + if (!cleanupLatch.await(1, TimeUnit.SECONDS)) { + throw new RuntimeException("Waiting for the latch timed out!"); + } } catch (InterruptedException e) { // ignore