fix websocket tests from merge
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
cd3f495e9c
commit
d5cf429537
|
@ -33,6 +33,7 @@ import org.eclipse.jetty.servlet.ServletContextHandler;
|
|||
import org.eclipse.jetty.util.BufferUtil;
|
||||
import org.eclipse.jetty.websocket.api.Session;
|
||||
import org.eclipse.jetty.websocket.client.WebSocketClient;
|
||||
import org.eclipse.jetty.websocket.core.CloseStatus;
|
||||
import org.eclipse.jetty.websocket.core.Frame;
|
||||
import org.eclipse.jetty.websocket.core.OpCode;
|
||||
import org.eclipse.jetty.websocket.core.internal.Generator;
|
||||
|
@ -150,7 +151,7 @@ public class WebSocketStatsTest
|
|||
assertThat(statistics.getReceivedMessages(), is(numMessages + 2L));
|
||||
|
||||
Frame textFrame = new Frame(OpCode.TEXT, msgText);
|
||||
Frame closeFrame = new Frame(OpCode.CLOSE);
|
||||
Frame closeFrame = CloseStatus.NORMAL_STATUS.toFrame();
|
||||
|
||||
final long textFrameSize = getFrameByteSize(textFrame);
|
||||
final long closeFrameSize = getFrameByteSize(closeFrame);
|
||||
|
|
|
@ -467,7 +467,7 @@ public class DistributionTests extends AbstractDistributionTest
|
|||
assertThat(webSocketListener.textMessages.poll(5, TimeUnit.SECONDS), is("echo message"));
|
||||
session.close();
|
||||
assertTrue(webSocketListener.closeLatch.await(5, TimeUnit.SECONDS));
|
||||
assertThat(webSocketListener.closeCode, is(StatusCode.NO_CODE));
|
||||
assertThat(webSocketListener.closeCode, is(StatusCode.NORMAL));
|
||||
|
||||
// Verify that /test2 and /test3 could not be started.
|
||||
ContentResponse response = client.GET(serverUri.resolve("/test2/badonopen/a"));
|
||||
|
@ -482,7 +482,7 @@ public class DistributionTests extends AbstractDistributionTest
|
|||
assertThat(webSocketListener.textMessages.poll(5, TimeUnit.SECONDS), is("echo message"));
|
||||
session.close();
|
||||
assertTrue(webSocketListener.closeLatch.await(5, TimeUnit.SECONDS));
|
||||
assertThat(webSocketListener.closeCode, is(StatusCode.NO_CODE));
|
||||
assertThat(webSocketListener.closeCode, is(StatusCode.NORMAL));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue