Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoyanchev committed May 1, 2020
1 parent aa97563 commit 6659e96
Showing 1 changed file with 1 addition and 5 deletions.
Expand Up @@ -26,7 +26,6 @@
import org.springframework.web.socket.CloseStatus;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.handler.ExceptionWebSocketHandlerDecorator;
import org.springframework.web.socket.sockjs.SockJsMessageDeliveryException;
import org.springframework.web.socket.sockjs.SockJsTransportFailureException;
import org.springframework.web.socket.sockjs.frame.SockJsFrame;

Expand Down Expand Up @@ -118,10 +117,7 @@ public void delegateMessagesWithError() throws Exception {
willThrow(new IOException()).given(this.webSocketHandler).handleMessage(session, new TextMessage(msg2));

session.delegateConnectionEstablished();

assertThatExceptionOfType(SockJsMessageDeliveryException.class)
.isThrownBy(() -> session.delegateMessages(msg1, msg2, msg3))
.satisfies(ex -> assertThat(ex.getUndeliveredMessages()).containsExactly(msg3));
session.delegateMessages(msg1, msg2, msg3);

verify(this.webSocketHandler).afterConnectionEstablished(session);
verify(this.webSocketHandler).handleMessage(session, new TextMessage(msg1));
Expand Down

0 comments on commit 6659e96

Please sign in to comment.