From 7ff071b8692dd96315be5cfb599e0406da2bdb34 Mon Sep 17 00:00:00 2001 From: jansupol Date: Mon, 14 Nov 2022 23:03:45 +0100 Subject: [PATCH] Call tearDown to prevent Address already in use Signed-off-by: jansupol --- .../examples/helloworld/RequestScopedResourceTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/helloworld-weld/src/test/java/org/glassfish/jersey/examples/helloworld/RequestScopedResourceTest.java b/examples/helloworld-weld/src/test/java/org/glassfish/jersey/examples/helloworld/RequestScopedResourceTest.java index 47415b0b57..eeae260bb7 100644 --- a/examples/helloworld-weld/src/test/java/org/glassfish/jersey/examples/helloworld/RequestScopedResourceTest.java +++ b/examples/helloworld-weld/src/test/java/org/glassfish/jersey/examples/helloworld/RequestScopedResourceTest.java @@ -22,6 +22,7 @@ import org.glassfish.jersey.test.JerseyTest; import org.jboss.weld.environment.se.Weld; import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.api.parallel.Execution; @@ -98,9 +99,13 @@ public static void after() throws Exception { } @Override - @AfterAll + @AfterEach public void tearDown() throws Exception { super.tearDown(); + } + + @AfterAll + public void report() { System.out.printf("SYNC: %d, ASYNC: %d, STRAIGHT: %d%n", parameterizedCounter.intValue(), parameterizedAsyncCounter.intValue(), straightCounter.intValue()); }