diff --git a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/FeignHttpClientUrlTests.java b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/FeignHttpClientUrlTests.java index 2d8c17d8..4ab8207c 100644 --- a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/FeignHttpClientUrlTests.java +++ b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/FeignHttpClientUrlTests.java @@ -31,12 +31,12 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.cloud.openfeign.test.NoSecurityConfiguration; +import org.springframework.cloud.test.TestSocketUtils; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.test.annotation.DirtiesContext; import org.springframework.util.ReflectionUtils; -import org.springframework.util.SocketUtils; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @@ -66,7 +66,7 @@ class FeignHttpClientUrlTests { @BeforeAll static void beforeClass() { - port = SocketUtils.findAvailableTcpPort(); + port = TestSocketUtils.findAvailableTcpPort(); System.setProperty("server.port", String.valueOf(port)); } diff --git a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/FeignHttpClientUrlTestsWithRetryableLoadBalancer.java b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/FeignHttpClientUrlTestsWithRetryableLoadBalancer.java index ba93f1f5..28810ac1 100644 --- a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/FeignHttpClientUrlTestsWithRetryableLoadBalancer.java +++ b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/FeignHttpClientUrlTestsWithRetryableLoadBalancer.java @@ -31,12 +31,12 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.cloud.openfeign.test.NoSecurityConfiguration; +import org.springframework.cloud.test.TestSocketUtils; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.test.annotation.DirtiesContext; import org.springframework.util.ReflectionUtils; -import org.springframework.util.SocketUtils; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @@ -67,7 +67,7 @@ class FeignHttpClientUrlTestsWithRetryableLoadBalancer { @BeforeAll static void beforeClass() { - port = SocketUtils.findAvailableTcpPort(); + port = TestSocketUtils.findAvailableTcpPort(); System.setProperty("server.port", String.valueOf(port)); } diff --git a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/circuitbreaker/CircuitBreakerTests.java b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/circuitbreaker/CircuitBreakerTests.java index da6dfa05..af7e9c6c 100644 --- a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/circuitbreaker/CircuitBreakerTests.java +++ b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/circuitbreaker/CircuitBreakerTests.java @@ -38,12 +38,12 @@ import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.FallbackFactory; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.test.NoSecurityConfiguration; +import org.springframework.cloud.test.TestSocketUtils; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.stereotype.Component; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.util.SocketUtils; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @@ -73,7 +73,7 @@ class CircuitBreakerTests { @BeforeAll static void beforeClass() { - System.setProperty("server.port", String.valueOf(SocketUtils.findAvailableTcpPort())); + System.setProperty("server.port", String.valueOf(TestSocketUtils.findAvailableTcpPort())); } @AfterAll diff --git a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/circuitbreaker/CircuitBreakerWithNoFallbackTests.java b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/circuitbreaker/CircuitBreakerWithNoFallbackTests.java index 56dfd2c4..9f54b977 100644 --- a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/circuitbreaker/CircuitBreakerWithNoFallbackTests.java +++ b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/circuitbreaker/CircuitBreakerWithNoFallbackTests.java @@ -35,11 +35,11 @@ import org.springframework.cloud.client.circuitbreaker.NoFallbackAvailableExcept import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.test.NoSecurityConfiguration; +import org.springframework.cloud.test.TestSocketUtils; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.util.SocketUtils; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @@ -66,7 +66,7 @@ public class CircuitBreakerWithNoFallbackTests { @BeforeAll public static void beforeClass() { - System.setProperty("server.port", String.valueOf(SocketUtils.findAvailableTcpPort())); + System.setProperty("server.port", String.valueOf(TestSocketUtils.findAvailableTcpPort())); } @AfterAll diff --git a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/support/AbstractSpringMvcContractIntegrationTests.java b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/support/AbstractSpringMvcContractIntegrationTests.java index 619e453d..994749d6 100644 --- a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/support/AbstractSpringMvcContractIntegrationTests.java +++ b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/support/AbstractSpringMvcContractIntegrationTests.java @@ -28,11 +28,11 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.test.NoSecurityConfiguration; +import org.springframework.cloud.test.TestSocketUtils; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.http.HttpHeaders; -import org.springframework.util.SocketUtils; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -49,7 +49,7 @@ public class AbstractSpringMvcContractIntegrationTests { @BeforeAll public static void beforeClass() { - System.setProperty("server.port", String.valueOf(SocketUtils.findAvailableTcpPort())); + System.setProperty("server.port", String.valueOf(TestSocketUtils.findAvailableTcpPort())); } @AfterAll