Issue #207 - testing JsrSessionTest needs started ClientContainer

This commit is contained in:
Joakim Erdfelt 2017-05-08 07:16:36 -07:00
parent d1281565ff
commit 546ccf5814
1 changed files with 4 additions and 1 deletions

View File

@ -55,6 +55,7 @@ public class JsrSessionTest
@Rule @Rule
public LeakTrackingBufferPoolRule bufferPool = new LeakTrackingBufferPoolRule("Test"); public LeakTrackingBufferPoolRule bufferPool = new LeakTrackingBufferPoolRule("Test");
private SimpleContainerScope containerScope;
private ClientContainer container; private ClientContainer container;
private JsrSession session; private JsrSession session;
@ -67,7 +68,9 @@ public class JsrSessionTest
WebSocketPolicy policy = WebSocketPolicy.newClientPolicy(); WebSocketPolicy policy = WebSocketPolicy.newClientPolicy();
// Container // Container
container = new ClientContainer(new SimpleContainerScope(policy, bufferPool)); containerScope = new SimpleContainerScope(policy, bufferPool);
containerScope.start();
container = new ClientContainer(containerScope);
container.start(); container.start();
LocalWebSocketConnection connection = new LocalWebSocketConnection(bufferPool); LocalWebSocketConnection connection = new LocalWebSocketConnection(bufferPool);
ClientEndpointConfig config = new EmptyClientEndpointConfig(); ClientEndpointConfig config = new EmptyClientEndpointConfig();