From c29de634b7c53c27df9be1d902219e5bdc300798 Mon Sep 17 00:00:00 2001 From: Ulisses Lima Date: Tue, 19 Apr 2022 15:02:25 -0300 Subject: [PATCH] BAEL-5157 - Exception Handling with Jersey (#12090) * BAEL-5157 - Exception Handling with Jersey First draft: https://drafts.baeldung.com/wp-admin/post.php?post=131880&action=edit * BAEL-5157 * more meaningful exception messages * 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(); }