Close Spring context in SockJS integration test setup

This commit is contained in:
Rossen Stoyanchev
2014-10-28 17:49:06 -04:00
parent 70e6e3bb39
commit 8c727be4e1
2 changed files with 7 additions and 1 deletions

View File

@@ -82,7 +82,7 @@ public class JettyWebSocketTestServer implements WebSocketTestServer {
@Override
public void stop() throws Exception {
if (this.jettyServer.isRunning()) {
this.jettyServer.setStopTimeout(0);
this.jettyServer.setStopTimeout(5000);
this.jettyServer.stop();
}
}

View File

@@ -122,6 +122,12 @@ public abstract class AbstractSockJsIntegrationTests {
catch (Throwable t) {
logger.error("Failed to stop server", t);
}
try {
this.wac.close();
}
catch (Throwable t) {
logger.error("Failed to close WebApplicationContext", t);
}
}
protected abstract Class<?> upgradeStrategyConfigClass();