Fix WebSocketInChA according latest SF
* The `SimpleBrokerMessageHandler` has been fixed the way it consults a `session` store for sending reply. The session can be added to that store only when we send a `CONNECT` command. Fix `WebSocketInboundChannelAdapter` to send additional `CONNECT` message in the `afterSessionStarted()` and when selected `SubProtocolHandler` is a `StompSubProtocolHandler` * Add extract check into the `StompIntegrationTests` for events: now we also get a `SessionConnectedEvent` as well * Fix typo in the `index-docinfo.xml`
This commit is contained in:
@@ -157,6 +157,10 @@ public class StompIntegrationTests {
|
||||
|
||||
@Test
|
||||
public void sendMessageToControllerAndReceiveReplyViaTopic() throws Exception {
|
||||
Message<?> receive = this.webSocketEvents.receive(20000);
|
||||
assertNotNull(receive);
|
||||
Object event = receive.getPayload();
|
||||
assertThat(event, instanceOf(SessionConnectedEvent.class));
|
||||
|
||||
StompHeaderAccessor headers = StompHeaderAccessor.create(StompCommand.SUBSCRIBE);
|
||||
headers.setSubscriptionId("subs1");
|
||||
@@ -168,9 +172,9 @@ public class StompIntegrationTests {
|
||||
|
||||
this.webSocketOutputChannel.send(message);
|
||||
|
||||
Message<?> receive = this.webSocketEvents.receive(20000);
|
||||
receive = this.webSocketEvents.receive(20000);
|
||||
assertNotNull(receive);
|
||||
Object event = receive.getPayload();
|
||||
event = receive.getPayload();
|
||||
assertThat(event, instanceOf(ReceiptEvent.class));
|
||||
Message<?> receiptMessage = ((ReceiptEvent) event).getMessage();
|
||||
headers = StompHeaderAccessor.wrap(receiptMessage);
|
||||
|
||||
Reference in New Issue
Block a user