Fix WebSocketComponents LifeCycle in AbstractJavaxWebSocketFrameHandlerTest

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2021-08-04 16:19:34 +10:00
parent de8cbcf588
commit 316c46675e
1 changed files with 4 additions and 1 deletions

View File

@ -28,17 +28,21 @@ import org.junit.jupiter.api.BeforeAll;
public abstract class AbstractJavaxWebSocketFrameHandlerTest
{
protected static DummyContainer container;
private static WebSocketComponents components;
@BeforeAll
public static void initContainer() throws Exception
{
container = new DummyContainer();
container.start();
components = new WebSocketComponents();
components.start();
}
@AfterAll
public static void stopContainer() throws Exception
{
components.stop();
container.stop();
}
@ -48,7 +52,6 @@ public abstract class AbstractJavaxWebSocketFrameHandlerTest
protected EndpointConfig endpointConfig;
protected CoreSession coreSession = new CoreSession.Empty()
{
private final WebSocketComponents components = new WebSocketComponents();
@Override
public WebSocketComponents getWebSocketComponents()