From 153a748166e68a35543bf66bc4e64d95d635b0bd Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Mon, 17 Jun 2019 13:02:24 -0400 Subject: [PATCH] Fix StompMHWebSocketIntTests for reconnect events https://build.spring.io/browse/INT-MASTERSPRING40-740 --- .../StompMessageHandlerWebSocketIntegrationTests.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spring-integration-stomp/src/test/java/org/springframework/integration/stomp/outbound/StompMessageHandlerWebSocketIntegrationTests.java b/spring-integration-stomp/src/test/java/org/springframework/integration/stomp/outbound/StompMessageHandlerWebSocketIntegrationTests.java index 1688d40423..a8c64b22ca 100644 --- a/spring-integration-stomp/src/test/java/org/springframework/integration/stomp/outbound/StompMessageHandlerWebSocketIntegrationTests.java +++ b/spring-integration-stomp/src/test/java/org/springframework/integration/stomp/outbound/StompMessageHandlerWebSocketIntegrationTests.java @@ -44,6 +44,7 @@ import org.springframework.integration.config.EnableIntegration; import org.springframework.integration.event.inbound.ApplicationEventListeningMessageProducer; import org.springframework.integration.stomp.StompSessionManager; import org.springframework.integration.stomp.WebSocketStompSessionManager; +import org.springframework.integration.stomp.event.StompConnectionFailedEvent; import org.springframework.integration.stomp.event.StompExceptionEvent; import org.springframework.integration.stomp.event.StompIntegrationEvent; import org.springframework.integration.stomp.event.StompReceiptEvent; @@ -140,6 +141,14 @@ public class StompMessageHandlerWebSocketIntegrationTests { Message failedMessage = messageDeliveryException.getFailedMessage(); assertThat((String) failedMessage.getPayload()).contains("preSend intentional Exception"); + receive = this.stompEvents.receive(10000); + assertThat(receive).isNotNull(); + assertThat(receive.getPayload()).isInstanceOf(StompConnectionFailedEvent.class); + + receive = this.stompEvents.receive(10000); + assertThat(receive).isNotNull(); + assertThat(receive.getPayload()).isInstanceOf(StompSessionConnectedEvent.class); + receive = this.stompEvents.receive(10000); assertThat(receive).isNotNull(); assertThat(receive.getPayload()).isInstanceOf(StompReceiptEvent.class);