diff --git a/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/EndpointAPITest.java b/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/EndpointAPITest.java index d05473c8bf5..2750e30bcaf 100644 --- a/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/EndpointAPITest.java +++ b/systests/container-integration/grizzly/src/test/java/org/apache/cxf/systest/grizzly/EndpointAPITest.java @@ -23,6 +23,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.URL; +import java.util.concurrent.TimeUnit; import javax.xml.namespace.QName; @@ -62,7 +63,11 @@ public void setUp() { @After public void tearDown() { - server.shutdownNow(); + try { + server.shutdown().get(10, TimeUnit.SECONDS); + } catch (Exception e) { + server.shutdownNow(); + } server = null; }