From 2f12351292564fb2090707ee117620e2a51be640 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Tue, 25 Feb 2020 10:07:15 +0000 Subject: [PATCH] Refine BlockHound support - disable for Java 14/15 for now until BlockHound support - targeted installation of required integrations only --- .../core/SpringCoreBlockHoundIntegrationTests.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 2d8648335c..f2245eff20 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(); }