Ignores blockhound for java16

This includes moving the blockhound-junit-platform dependency to a profile.

Fixes gh-2186
This commit is contained in:
spencergibb
2021-03-19 12:18:42 -04:00
parent b65230e2ca
commit 168f33cc90
2 changed files with 11 additions and 2 deletions

View File

@@ -118,7 +118,7 @@
</dependency>
<dependency>
<groupId>io.projectreactor.tools</groupId>
<artifactId>blockhound-junit-platform</artifactId>
<artifactId>blockhound</artifactId>
<scope>test</scope>
</dependency>
<dependency>
@@ -194,6 +194,13 @@
<activation>
<jdk>(,16)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>io.projectreactor.tools</groupId>
<artifactId>blockhound-junit-platform</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>

View File

@@ -18,6 +18,8 @@ package org.springframework.cloud.gateway.test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledForJreRange;
import org.junit.jupiter.api.condition.JRE;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;
@@ -27,7 +29,7 @@ import reactor.core.scheduler.Schedulers;
public class CustomBlockHoundIntegrationTest {
@Test
// @EnabledOnJre(JRE.JAVA_8)
@DisabledForJreRange(min = JRE.JAVA_16)
public void shouldThrowErrorForBlockingCallWithCustomBlockHoundIntegration() {
Assertions.assertThrows(RuntimeException.class, () -> Mono.fromCallable(() -> {
Thread.sleep(1);