mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-24 15:49:26 +00:00
Fix failing test after previous commit
See gh-23793
This commit is contained in:
+7
-3
@@ -46,6 +46,7 @@ import org.springframework.web.socket.TextMessage;
|
||||
import org.springframework.web.socket.WebSocketHandler;
|
||||
import org.springframework.web.socket.WebSocketSession;
|
||||
import org.springframework.web.socket.client.WebSocketClient;
|
||||
import org.springframework.web.socket.handler.WebSocketHandlerDecorator;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
|
||||
@@ -319,9 +320,12 @@ public class WebSocketStompClientTests {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private TcpConnection<byte[]> getTcpConnection() throws Exception {
|
||||
WebSocketHandler webSocketHandler = connect();
|
||||
webSocketHandler.afterConnectionEstablished(this.webSocketSession);
|
||||
return (TcpConnection<byte[]>) webSocketHandler;
|
||||
WebSocketHandler handler = connect();
|
||||
handler.afterConnectionEstablished(this.webSocketSession);
|
||||
if (handler instanceof WebSocketHandlerDecorator) {
|
||||
handler = ((WebSocketHandlerDecorator) handler).getLastHandler();
|
||||
}
|
||||
return (TcpConnection<byte[]>) handler;
|
||||
}
|
||||
|
||||
private void testInactivityTaskScheduling(Runnable runnable, long delay, long sleepTime)
|
||||
|
||||
Reference in New Issue
Block a user