From 79bc953888c6a9386fda9e1ddd5e6d78022031cb Mon Sep 17 00:00:00 2001 From: Ulisses Lima Date: Tue, 19 Apr 2022 12:27:00 -0300 Subject: [PATCH] BAEL-5157 * midified integration test to use the first available port --- .../exceptionhandling/rest/StocksResourceIntegrationTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jersey/src/test/java/com/baeldung/jersey/exceptionhandling/rest/StocksResourceIntegrationTest.java b/jersey/src/test/java/com/baeldung/jersey/exceptionhandling/rest/StocksResourceIntegrationTest.java index 1648116918..ceb59adc1f 100644 --- a/jersey/src/test/java/com/baeldung/jersey/exceptionhandling/rest/StocksResourceIntegrationTest.java +++ b/jersey/src/test/java/com/baeldung/jersey/exceptionhandling/rest/StocksResourceIntegrationTest.java @@ -17,6 +17,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; import org.glassfish.jersey.test.JerseyTest; +import org.glassfish.jersey.test.TestProperties; import org.junit.Test; import com.baeldung.jersey.exceptionhandling.ExceptionHandlingConfig; @@ -35,6 +36,7 @@ public class StocksResourceIntegrationTest extends JerseyTest { @Override protected Application configure() { + forceSet(TestProperties.CONTAINER_PORT, "0"); return new ExceptionHandlingConfig(); }