Upgrade to Undertow 1.4 CR3 (and Jackson 2.8 GA)

This commit also renames WebSocketIntegrationTests to WebSocketHandshakeTests.

Issue: SPR-14328
This commit is contained in:
Juergen Hoeller
2016-07-05 20:47:53 +02:00
parent acdb43f470
commit 12d373659a
5 changed files with 22 additions and 22 deletions

View File

@@ -21,7 +21,6 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
@@ -48,8 +47,6 @@ import org.springframework.web.socket.server.support.DefaultHandshakeHandler;
*/
public abstract class AbstractWebSocketIntegrationTests {
protected Log logger = LogFactory.getLog(getClass());
private static Map<Class<?>, Class<?>> upgradeStrategyConfigTypes = new HashMap<>();
static {
@@ -58,6 +55,7 @@ public abstract class AbstractWebSocketIntegrationTests {
upgradeStrategyConfigTypes.put(UndertowTestServer.class, UndertowUpgradeStrategyConfig.class);
}
@Rule
public final TestName testName = new TestName();
@@ -67,12 +65,13 @@ public abstract class AbstractWebSocketIntegrationTests {
@Parameter(1)
public WebSocketClient webSocketClient;
protected final Log logger = LogFactory.getLog(getClass());
protected AnnotationConfigWebApplicationContext wac;
@Before
public void setup() throws Exception {
logger.debug("Setting up '" + this.testName.getMethodName() + "', client=" +
this.webSocketClient.getClass().getSimpleName() + ", server=" +
this.server.getClass().getSimpleName());
@@ -155,6 +154,7 @@ public abstract class AbstractWebSocketIntegrationTests {
}
}
@Configuration
static class TomcatUpgradeStrategyConfig extends AbstractRequestUpgradeStrategyConfig {
@@ -164,6 +164,7 @@ public abstract class AbstractWebSocketIntegrationTests {
}
}
@Configuration
static class UndertowUpgradeStrategyConfig extends AbstractRequestUpgradeStrategyConfig {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,9 +46,10 @@ import static org.junit.Assert.*;
* Client and server-side WebSocket integration tests.
*
* @author Rossen Stoyanchev
* @author Juergen Hoeller
*/
@RunWith(Parameterized.class)
public class WebSocketIntegrationTests extends AbstractWebSocketIntegrationTests {
public class WebSocketHandshakeTests extends AbstractWebSocketIntegrationTests {
@Parameters(name = "server [{0}], client [{1}]")
public static Iterable<Object[]> arguments() {
@@ -62,7 +63,7 @@ public class WebSocketIntegrationTests extends AbstractWebSocketIntegrationTest
@Override
protected Class<?>[] getAnnotatedConfigClasses() {
return new Class<?>[] { TestConfig.class };
return new Class<?>[] {TestConfig.class};
}
@Test
@@ -75,11 +76,8 @@ public class WebSocketIntegrationTests extends AbstractWebSocketIntegrationTest
session.close();
}
// SPR-12727
@Test
@Test // SPR-12727
public void unsolicitedPongWithEmptyPayload() throws Exception {
String url = getWsBaseUrl() + "/ws";
WebSocketSession session = this.webSocketClient.doHandshake(new AbstractWebSocketHandler() {}, url).get();
@@ -126,7 +124,6 @@ public class WebSocketIntegrationTests extends AbstractWebSocketIntegrationTest
private Throwable transportError;
public void setWaitMessageCount(int waitMessageCount) {
this.waitMessageCount = waitMessageCount;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -61,7 +61,7 @@ public class WebSocketConfigurationTests extends AbstractWebSocketIntegrationTes
@Override
protected Class<?>[] getAnnotatedConfigClasses() {
return new Class<?>[] { TestConfig.class };
return new Class<?>[] {TestConfig.class};
}
@Test