AbstractClientSockJsSession.close propagates IOException from disconnect
Issue: SPR-16415
(cherry picked from commit cf100d4)
This commit is contained in:
@@ -129,8 +129,10 @@ public class ClientSockJsSessionTests {
|
||||
@Test
|
||||
public void handleFrameMessageWithWebSocketHandlerException() throws Exception {
|
||||
this.session.handleFrame(SockJsFrame.openFrame().getContent());
|
||||
willThrow(new IllegalStateException("Fake error")).given(this.handler).handleMessage(this.session, new TextMessage("foo"));
|
||||
willThrow(new IllegalStateException("Fake error")).given(this.handler).handleMessage(this.session, new TextMessage("bar"));
|
||||
willThrow(new IllegalStateException("Fake error")).given(this.handler)
|
||||
.handleMessage(this.session, new TextMessage("foo"));
|
||||
willThrow(new IllegalStateException("Fake error")).given(this.handler)
|
||||
.handleMessage(this.session, new TextMessage("bar"));
|
||||
this.session.handleFrame(SockJsFrame.messageFrame(CODEC, "foo", "bar").getContent());
|
||||
assertThat(this.session.isOpen(), equalTo(true));
|
||||
verify(this.handler).afterConnectionEstablished(this.session);
|
||||
|
||||
Reference in New Issue
Block a user