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:
Artem Bilan
2018-07-24 14:59:39 -04:00
parent 001b86b641
commit a7ffbde07f
3 changed files with 23 additions and 8 deletions

View File

@@ -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);