Skip to content

Commit 153a748

Browse files
committed
Fix StompMHWebSocketIntTests for reconnect events
https://build.spring.io/browse/INT-MASTERSPRING40-740
1 parent a77dac5 commit 153a748

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
@@ -44,6 +44,7 @@
4444
import org.springframework.integration.event.inbound.ApplicationEventListeningMessageProducer;
4545
import org.springframework.integration.stomp.StompSessionManager;
4646
import org.springframework.integration.stomp.WebSocketStompSessionManager;
47+
import org.springframework.integration.stomp.event.StompConnectionFailedEvent;
4748
import org.springframework.integration.stomp.event.StompExceptionEvent;
4849
import org.springframework.integration.stomp.event.StompIntegrationEvent;
4950
import org.springframework.integration.stomp.event.StompReceiptEvent;
@@ -140,6 +141,14 @@ public void testStompMessageHandler() throws InterruptedException {
140141
Message<?> failedMessage = messageDeliveryException.getFailedMessage();
141142
assertThat((String) failedMessage.getPayload()).contains("preSend intentional Exception");
142143

144+
receive = this.stompEvents.receive(10000);
145+
assertThat(receive).isNotNull();
146+
assertThat(receive.getPayload()).isInstanceOf(StompConnectionFailedEvent.class);
147+
148+
receive = this.stompEvents.receive(10000);
149+
assertThat(receive).isNotNull();
150+
assertThat(receive.getPayload()).isInstanceOf(StompSessionConnectedEvent.class);
151+
143152
receive = this.stompEvents.receive(10000);
144153
assertThat(receive).isNotNull();
145154
assertThat(receive.getPayload()).isInstanceOf(StompReceiptEvent.class);

0 commit comments

Comments
 (0)