public void testClientInMemory() throws Exception {
WebContainer servletEngine = new WebContainer(new HeaderInfoServlet());
servletEngine.start();
IServer server = new HttpServer(new HeaderInfoServerHandler());
ConnectionUtils.start(server);
int xSocketPort = server.getLocalPort();
// warm up
System.out.println("warm up jetty");
perform(3, 100, servletEngine.getLocalPort(), null);
QAUtil.sleep(200);
System.out.println("warm up xSocket");
perform(3, 100, xSocketPort, null);
QAUtil.sleep(200);
System.out.println("run jetty");
int elapsedJetty = perform(4, 300, servletEngine.getLocalPort(), null);
QAUtil.sleep(200);
System.out.println("run xSocket");
int elapsedXSocket = perform(4, 300, xSocketPort, null);
QAUtil.sleep(200);
server.close();
servletEngine.stop();
printResult("in memory", elapsedJetty, elapsedXSocket, 30);
}