Align setup of SockJS and WebSocket integration tests
Failures in JettySockJsIntegrationTests after the upgrade to 9.4 were hidden due to the PERFORMANCE test group but were failing on the CI performance build with IllegalStateException inside Jetty on "Failure find the required ServletContext attribute org.eclipse.jetty.util.DecoratedObjectFactory".
This commit is contained in:
parent
871f5efeaa
commit
ea67a637ae
|
@ -39,7 +39,6 @@ import javax.servlet.http.HttpServletResponse;
|
|||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
|
@ -111,16 +110,18 @@ public abstract class AbstractSockJsIntegrationTests {
|
|||
public void setup() throws Exception {
|
||||
logger.debug("Setting up '" + this.testName.getMethodName() + "'");
|
||||
this.testFilter = new TestFilter();
|
||||
|
||||
this.wac = new AnnotationConfigWebApplicationContext();
|
||||
this.wac.register(TestConfig.class, upgradeStrategyConfigClass());
|
||||
|
||||
this.server = createWebSocketTestServer();
|
||||
this.server.setup();
|
||||
this.server.deployConfig(this.wac, this.testFilter);
|
||||
// Set ServletContext in WebApplicationContext after deployment but before
|
||||
// starting the server.
|
||||
this.server.start();
|
||||
|
||||
this.wac.setServletContext(this.server.getServletContext());
|
||||
this.wac.refresh();
|
||||
this.server.start();
|
||||
|
||||
this.baseUrl = "http://localhost:" + this.server.getPort();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue