protected void shutdownTest(ITestContext context) throws Exception { connectorServer.stop(); connectorServer.destroy(); serverConnectorFramework.release(); localConnectorFramework.release(); Reporter.log("Jetty Server Stopped", true); }
@OnStopped public void shutdown() throws Exception { if (server != null) { getLogger().debug("Shutting down server"); server.stop(); server.destroy(); server.join(); getLogger().info("Shut down {}", new Object[] {server}); } }
private void runTest(boolean ssl, boolean needClientAuth, boolean basicAuth) throws Exception { Server server = startServer(ssl, needClientAuth); try { runClient(ssl, basicAuth); } finally { LOG.debug(String.format("*****Server***** - Stopping")); server.stop(); LOG.debug(String.format("*****Server***** - Stopped")); server.destroy(); LOG.debug(String.format("*****Server***** - Destroyed")); } }
@Override protected void tearDown() throws Exception { if (running) { // stop structr server.stop(); // do we need to wait here? answer: yes! do { try { Thread.sleep(100); } catch (Throwable t) { } } while (!server.isStopped()); server.destroy(); File testDir = new File(basePath); int count = 0; // try up to 10 times to delete the directory while (testDir.exists() && count++ < 10) { try { if (testDir.isDirectory()) { FileUtils.deleteDirectory(testDir); } else { testDir.delete(); } } catch (Throwable t) { } try { Thread.sleep(500); } catch (Throwable t) { } } } super.tearDown(); }
public void stopTestServer() throws Exception { server.stop(); server.destroy(); }
protected void doServerTearDown() throws Exception { server.stop(); server.destroy(); server = null; }
@AfterClass public static void stopServer() throws Exception { server.stop(); server.destroy(); }