Skip to content

Commit 2f12351

Browse files
committed
Refine BlockHound support
- disable for Java 14/15 for now until BlockHound support - targeted installation of required integrations only
1 parent b6f502d commit 2f12351

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

spring-core/src/test/java/org/springframework/core/SpringCoreBlockHoundIntegrationTests.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,34 @@
2121

2222
import org.junit.jupiter.api.BeforeAll;
2323
import org.junit.jupiter.api.Test;
24+
import org.junit.jupiter.api.condition.DisabledForJreRange;
2425
import reactor.blockhound.BlockHound;
26+
import reactor.core.scheduler.ReactorBlockHoundIntegration;
2527
import reactor.core.scheduler.Schedulers;
2628

2729
import org.springframework.tests.sample.objects.TestObject;
2830
import org.springframework.util.ConcurrentReferenceHashMap;
2931

3032
import static org.assertj.core.api.Assertions.assertThat;
3133
import static org.assertj.core.api.Assertions.assertThatThrownBy;
34+
import static org.junit.jupiter.api.condition.JRE.JAVA_14;
3235

3336
/**
3437
* Tests to verify the spring-core BlockHound integration rules.
3538
*
3639
* @author Rossen Stoyanchev
3740
* @since 5.2.4
3841
*/
42+
@DisabledForJreRange(min = JAVA_14)
3943
public class SpringCoreBlockHoundIntegrationTests {
4044

4145

4246
@BeforeAll
4347
static void setUp() {
44-
BlockHound.install();
48+
BlockHound.builder()
49+
.with(new ReactorBlockHoundIntegration()) // Reactor non-blocking thread predicate
50+
.with(new ReactiveAdapterRegistry.SpringCoreBlockHoundIntegration())
51+
.install();
4552
}
4653

4754

0 commit comments

Comments
 (0)