Close Spring context in SockJS integration test setup

master
Rossen Stoyanchev 10 years ago
parent 70e6e3bb39
commit 8c727be4e1
  1. 2
      spring-websocket/src/test/java/org/springframework/web/socket/JettyWebSocketTestServer.java
  2. 6
      spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/AbstractSockJsIntegrationTests.java

@ -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();
}
}

@ -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();

Loading…
Cancel
Save