use of org.junit.Before in project jetty.project by eclipse.
the class GZIPContentDecoderTest method beforeClass.
@Before
public void beforeClass() throws Exception {
buffers.set(0);
pool = new ArrayByteBufferPool() {
@Override
public ByteBuffer acquire(int size, boolean direct) {
buffers.incrementAndGet();
return super.acquire(size, direct);
}
@Override
public void release(ByteBuffer buffer) {
buffers.decrementAndGet();
super.release(buffer);
}
};
}
use of org.junit.Before in project jetty.project by eclipse.
the class SelectChannelEndPointTest method startManager.
@Before
public void startManager() throws Exception {
_writeCount = 1;
_lastEndPoint = null;
_lastEndPointLatch = new CountDownLatch(1);
_connector = ServerSocketChannel.open();
_connector.socket().bind(null);
_scheduler.start();
_threadPool.start();
_manager.start();
}
use of org.junit.Before in project jetty.project by eclipse.
the class IdleTimeoutTest method setUp.
@Before
public void setUp() throws Exception {
_open = true;
_expired = null;
_timer = new TimerScheduler();
_timer.start();
_timeout = new IdleTimeout(_timer) {
@Override
protected void onIdleExpired(TimeoutException timeout) {
_expired = timeout;
}
@Override
public boolean isOpen() {
return _open;
}
};
_timeout.setIdleTimeout(1000);
}
use of org.junit.Before in project jetty.project by eclipse.
the class BalancerServletTest method prepare.
@Before
public void prepare() throws Exception {
client = new HttpClient();
client.start();
}
use of org.junit.Before in project jetty.project by eclipse.
the class ConnectHandlerTest method prepare.
@Before
public void prepare() throws Exception {
server = new Server();
serverConnector = new ServerConnector(server);
server.addConnector(serverConnector);
server.setHandler(new ServerHandler());
server.start();
prepareProxy();
}
Aggregations