Browse Source

Refine BlockHound support

- disable for Java 14/15 for now until BlockHound support
- targeted installation of required integrations only
pull/24587/head
Rossen Stoyanchev 5 years ago
parent
commit
2f12351292
  1. 9
      spring-core/src/test/java/org/springframework/core/SpringCoreBlockHoundIntegrationTests.java

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

@ -21,7 +21,9 @@ import java.util.concurrent.CompletableFuture; @@ -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; @@ -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; @@ -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();
}

Loading…
Cancel
Save