From 4b62b79fd55b70af852b988c0ff8fa39bf09908a Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Wed, 29 Apr 2020 16:36:16 -0400 Subject: [PATCH] Moves blockhound integration to spring cloud package (#1697) This then does not override reactor integration --- pom.xml | 2 +- spring-cloud-gateway-core/pom.xml | 15 --------------- .../test}/CustomBlockHoundIntegration.java | 5 +++-- .../test}/CustomBlockHoundIntegrationTest.java | 9 +++++---- ...r.blockhound.integration.BlockHoundIntegration | 2 +- 5 files changed, 10 insertions(+), 23 deletions(-) rename spring-cloud-gateway-core/src/test/java/{reactor/blockhound/integration => org/springframework/cloud/gateway/test}/CustomBlockHoundIntegration.java (95%) rename spring-cloud-gateway-core/src/test/java/{reactor/blockhound/integration => org/springframework/cloud/gateway/test}/CustomBlockHoundIntegrationTest.java (85%) diff --git a/pom.xml b/pom.xml index 53cbeb55..c50709ea 100644 --- a/pom.xml +++ b/pom.xml @@ -56,7 +56,7 @@ 2.2.3.BUILD-SNAPSHOT 1.0.3.BUILD-SNAPSHOT 0.6 - 1.0.1.RELEASE + 1.0.3.RELEASE diff --git a/spring-cloud-gateway-core/pom.xml b/spring-cloud-gateway-core/pom.xml index 14afe855..44b37665 100644 --- a/spring-cloud-gateway-core/pom.xml +++ b/spring-cloud-gateway-core/pom.xml @@ -106,21 +106,6 @@ spring-boot-starter-test test - - org.junit.jupiter - junit-jupiter-api - test - - - org.junit.jupiter - junit-jupiter-engine - test - - - org.junit.platform - junit-platform-launcher - test - org.junit.vintage junit-vintage-engine diff --git a/spring-cloud-gateway-core/src/test/java/reactor/blockhound/integration/CustomBlockHoundIntegration.java b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/CustomBlockHoundIntegration.java similarity index 95% rename from spring-cloud-gateway-core/src/test/java/reactor/blockhound/integration/CustomBlockHoundIntegration.java rename to spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/CustomBlockHoundIntegration.java index eae061cd..82cd25d1 100644 --- a/spring-cloud-gateway-core/src/test/java/reactor/blockhound/integration/CustomBlockHoundIntegration.java +++ b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/CustomBlockHoundIntegration.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2019 the original author or authors. + * Copyright 2013-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ -package reactor.blockhound.integration; +package org.springframework.cloud.gateway.test; import reactor.blockhound.BlockHound; +import reactor.blockhound.integration.BlockHoundIntegration; /** * @author Tim Ysewyn diff --git a/spring-cloud-gateway-core/src/test/java/reactor/blockhound/integration/CustomBlockHoundIntegrationTest.java b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/CustomBlockHoundIntegrationTest.java similarity index 85% rename from spring-cloud-gateway-core/src/test/java/reactor/blockhound/integration/CustomBlockHoundIntegrationTest.java rename to spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/CustomBlockHoundIntegrationTest.java index e045201a..db4c1986 100644 --- a/spring-cloud-gateway-core/src/test/java/reactor/blockhound/integration/CustomBlockHoundIntegrationTest.java +++ b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/CustomBlockHoundIntegrationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2019 the original author or authors. + * Copyright 2013-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ -package reactor.blockhound.integration; +package org.springframework.cloud.gateway.test; import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; import reactor.core.scheduler.Schedulers; @@ -25,8 +26,8 @@ import reactor.core.scheduler.Schedulers; */ public class CustomBlockHoundIntegrationTest { - // @Test - // ignore fails on java 13 + @Test + // @EnabledOnJre(JRE.JAVA_8) public void shouldThrowErrorForBlockingCallWithCustomBlockHoundIntegration() { Assertions.assertThrows(RuntimeException.class, () -> Mono.fromCallable(() -> { Thread.sleep(1); diff --git a/spring-cloud-gateway-core/src/test/resources/META-INF/services/reactor.blockhound.integration.BlockHoundIntegration b/spring-cloud-gateway-core/src/test/resources/META-INF/services/reactor.blockhound.integration.BlockHoundIntegration index a6bdb542..210d816c 100644 --- a/spring-cloud-gateway-core/src/test/resources/META-INF/services/reactor.blockhound.integration.BlockHoundIntegration +++ b/spring-cloud-gateway-core/src/test/resources/META-INF/services/reactor.blockhound.integration.BlockHoundIntegration @@ -1 +1 @@ -reactor.blockhound.integration.CustomBlockHoundIntegration +org.springframework.cloud.gateway.test.CustomBlockHoundIntegration