diff --git a/spring-core/src/test/java/org/springframework/core/SpringCoreBlockHoundIntegrationTests.java b/spring-core/src/test/java/org/springframework/core/SpringCoreBlockHoundIntegrationTests.java index 2d8648335ca..f2245eff20d 100644 --- a/spring-core/src/test/java/org/springframework/core/SpringCoreBlockHoundIntegrationTests.java +++ b/spring-core/src/test/java/org/springframework/core/SpringCoreBlockHoundIntegrationTests.java @@ -21,7 +21,9 @@ import java.util.concurrent.CompletableFuture; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledForJreRange; import reactor.blockhound.BlockHound; +import reactor.core.scheduler.ReactorBlockHoundIntegration; import reactor.core.scheduler.Schedulers; import org.springframework.tests.sample.objects.TestObject; @@ -29,6 +31,7 @@ import org.springframework.util.ConcurrentReferenceHashMap; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; +import static org.junit.jupiter.api.condition.JRE.JAVA_14; /** * Tests to verify the spring-core BlockHound integration rules. @@ -36,12 +39,16 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; * @author Rossen Stoyanchev * @since 5.2.4 */ +@DisabledForJreRange(min = JAVA_14) public class SpringCoreBlockHoundIntegrationTests { @BeforeAll static void setUp() { - BlockHound.install(); + BlockHound.builder() + .with(new ReactorBlockHoundIntegration()) // Reactor non-blocking thread predicate + .with(new ReactiveAdapterRegistry.SpringCoreBlockHoundIntegration()) + .install(); }