From 4459ebb11aaa9d84986b0b15d7209a1e86632128 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 47415b0b57b..eeae260bb73 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()); }