Merge branch '1.2.x'
This commit is contained in:
@@ -27,7 +27,7 @@ public class ReverseWebSocketEndpoint {
|
||||
|
||||
@OnMessage
|
||||
public void handleMessage(Session session, String message) throws IOException {
|
||||
session.getBasicRemote().sendText(
|
||||
"Reversed: " + new StringBuilder(message).reverse());
|
||||
session.getBasicRemote()
|
||||
.sendText("Reversed: " + new StringBuilder(message).reverse());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ public class SnakeWebSocketHandler extends TextWebSocketHandler {
|
||||
public void afterConnectionClosed(WebSocketSession session, CloseStatus status)
|
||||
throws Exception {
|
||||
SnakeTimer.removeSnake(this.snake);
|
||||
SnakeTimer.broadcast(String.format("{'type': 'leave', 'id': %d}",
|
||||
Integer.valueOf(this.id)));
|
||||
SnakeTimer.broadcast(
|
||||
String.format("{'type': 'leave', 'id': %d}", Integer.valueOf(this.id)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,9 +61,9 @@ public class SampleWebSocketsApplicationTests {
|
||||
public void echoEndpoint() throws Exception {
|
||||
ConfigurableApplicationContext context = new SpringApplicationBuilder(
|
||||
ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class)
|
||||
.properties(
|
||||
"websocket.uri:ws://localhost:" + this.port + "/echo/websocket")
|
||||
.run("--spring.main.web_environment=false");
|
||||
.properties("websocket.uri:ws://localhost:" + this.port
|
||||
+ "/echo/websocket")
|
||||
.run("--spring.main.web_environment=false");
|
||||
long count = context.getBean(ClientConfiguration.class).latch.getCount();
|
||||
AtomicReference<String> messagePayloadReference = context
|
||||
.getBean(ClientConfiguration.class).messagePayload;
|
||||
@@ -76,8 +76,9 @@ public class SampleWebSocketsApplicationTests {
|
||||
public void reverseEndpoint() throws Exception {
|
||||
ConfigurableApplicationContext context = new SpringApplicationBuilder(
|
||||
ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class)
|
||||
.properties("websocket.uri:ws://localhost:" + this.port + "/reverse")
|
||||
.run("--spring.main.web_environment=false");
|
||||
.properties(
|
||||
"websocket.uri:ws://localhost:" + this.port + "/reverse")
|
||||
.run("--spring.main.web_environment=false");
|
||||
long count = context.getBean(ClientConfiguration.class).latch.getCount();
|
||||
AtomicReference<String> messagePayloadReference = context
|
||||
.getBean(ClientConfiguration.class).messagePayload;
|
||||
|
||||
@@ -67,8 +67,9 @@ public class CustomContainerWebSocketsApplicationTests {
|
||||
public void echoEndpoint() throws Exception {
|
||||
ConfigurableApplicationContext context = new SpringApplicationBuilder(
|
||||
ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class)
|
||||
.properties("websocket.uri:ws://localhost:" + PORT + "/ws/echo/websocket")
|
||||
.run("--spring.main.web_environment=false");
|
||||
.properties("websocket.uri:ws://localhost:" + PORT
|
||||
+ "/ws/echo/websocket")
|
||||
.run("--spring.main.web_environment=false");
|
||||
long count = context.getBean(ClientConfiguration.class).latch.getCount();
|
||||
AtomicReference<String> messagePayloadReference = context
|
||||
.getBean(ClientConfiguration.class).messagePayload;
|
||||
@@ -81,8 +82,9 @@ public class CustomContainerWebSocketsApplicationTests {
|
||||
public void reverseEndpoint() throws Exception {
|
||||
ConfigurableApplicationContext context = new SpringApplicationBuilder(
|
||||
ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class)
|
||||
.properties("websocket.uri:ws://localhost:" + PORT + "/ws/reverse").run(
|
||||
"--spring.main.web_environment=false");
|
||||
.properties(
|
||||
"websocket.uri:ws://localhost:" + PORT + "/ws/reverse")
|
||||
.run("--spring.main.web_environment=false");
|
||||
long count = context.getBean(ClientConfiguration.class).latch.getCount();
|
||||
AtomicReference<String> messagePayloadReference = context
|
||||
.getBean(ClientConfiguration.class).messagePayload;
|
||||
|
||||
Reference in New Issue
Block a user