From 168f33cc906a2d9a037de77a3e6e5974794d685a Mon Sep 17 00:00:00 2001 From: spencergibb Date: Fri, 19 Mar 2021 12:18:42 -0400 Subject: [PATCH] Ignores blockhound for java16 This includes moving the blockhound-junit-platform dependency to a profile. Fixes gh-2186 --- spring-cloud-gateway-server/pom.xml | 9 ++++++++- .../gateway/test/CustomBlockHoundIntegrationTest.java | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/spring-cloud-gateway-server/pom.xml b/spring-cloud-gateway-server/pom.xml index 6ba69a70..98b50435 100644 --- a/spring-cloud-gateway-server/pom.xml +++ b/spring-cloud-gateway-server/pom.xml @@ -118,7 +118,7 @@ io.projectreactor.tools - blockhound-junit-platform + blockhound test @@ -194,6 +194,13 @@ (,16) + + + io.projectreactor.tools + blockhound-junit-platform + test + + diff --git a/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/test/CustomBlockHoundIntegrationTest.java b/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/test/CustomBlockHoundIntegrationTest.java index db4c1986..69558c90 100644 --- a/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/test/CustomBlockHoundIntegrationTest.java +++ b/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/test/CustomBlockHoundIntegrationTest.java @@ -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);