improved test isolation

This commit is contained in:
Greg Wilkins 2016-06-02 14:24:18 +10:00
parent 059fbaa1d6
commit 89032b7eac
1 changed files with 4 additions and 3 deletions

View File

@ -44,17 +44,19 @@ import org.junit.Test;
public class LocalAsyncContextTest public class LocalAsyncContextTest
{ {
protected Server _server = new Server(); protected Server _server;
protected SuspendHandler _handler = new SuspendHandler(); protected SuspendHandler _handler;
protected Connector _connector; protected Connector _connector;
@Before @Before
public void init() throws Exception public void init() throws Exception
{ {
_server = new Server();
_connector = initConnector(); _connector = initConnector();
_server.setConnectors(new Connector[]{ _connector }); _server.setConnectors(new Connector[]{ _connector });
SessionHandler session = new SessionHandler(); SessionHandler session = new SessionHandler();
_handler = new SuspendHandler();
session.setHandler(_handler); session.setHandler(_handler);
_server.setHandler(session); _server.setHandler(session);
@ -547,7 +549,6 @@ public class LocalAsyncContextTest
private static AsyncListener __asyncListener = new AsyncListener() private static AsyncListener __asyncListener = new AsyncListener()
{ {
@Override @Override
public void onComplete(AsyncEvent event) throws IOException public void onComplete(AsyncEvent event) throws IOException
{ {