Skip to content

Commit ab64190

Browse files
artembilangaryrussell
authored andcommitted
Fix StompMHWebSocketIntTests for reconnect events
https://build.spring.io/browse/INT-MASTERSPRING40-740
1 parent b7ee269 commit ab64190

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spring-integration-stomp/src/test/java/org/springframework/integration/stomp/outbound/StompMessageHandlerWebSocketIntegrationTests.java

+9
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import org.springframework.integration.event.inbound.ApplicationEventListeningMessageProducer;
5050
import org.springframework.integration.stomp.StompSessionManager;
5151
import org.springframework.integration.stomp.WebSocketStompSessionManager;
52+
import org.springframework.integration.stomp.event.StompConnectionFailedEvent;
5253
import org.springframework.integration.stomp.event.StompExceptionEvent;
5354
import org.springframework.integration.stomp.event.StompIntegrationEvent;
5455
import org.springframework.integration.stomp.event.StompReceiptEvent;
@@ -145,6 +146,14 @@ public void testStompMessageHandler() throws InterruptedException {
145146
Message<?> failedMessage = messageDeliveryException.getFailedMessage();
146147
assertThat((String) failedMessage.getPayload(), containsString("preSend intentional Exception"));
147148

149+
receive = this.stompEvents.receive(10000);
150+
assertNotNull(receive);
151+
assertThat(receive.getPayload(), instanceOf(StompConnectionFailedEvent.class));
152+
153+
receive = this.stompEvents.receive(10000);
154+
assertNotNull(receive);
155+
assertThat(receive.getPayload(), instanceOf(StompSessionConnectedEvent.class));
156+
148157
receive = this.stompEvents.receive(10000);
149158
assertNotNull(receive);
150159
assertThat(receive.getPayload(), instanceOf(StompReceiptEvent.class));

0 commit comments

Comments
 (0)