@Test
public void testNonPersistent() throws Exception {
// start multiplexed http server
IServer mutliplexedHttpServer = new Server(0, new MultiplexedProtocolAdapter(new HttpProtocolAdapter(new ServerHandler(false))));
mutliplexedHttpServer.setIdleTimeoutMillis(60 * 60 * 1000);
mutliplexedHttpServer.start();
// start tcp concentrator
IServer tcpConcentrator = new TcpConcentratorServer(0, "localhost", mutliplexedHttpServer.getLocalPort());
tcpConcentrator.setIdleTimeoutMillis(60 * 60 * 1000);
tcpConcentrator.start();
HttpClient httpClient = new HttpClient();
for (int j = 0; j < 10; j++) {
LOG.fine("client: sending request");
IHttpResponse response = httpClient.call(new GetRequest("http://localhost:" + tcpConcentrator.getLocalPort() + "/test/loopid_" + j));
Assert.assertEquals(200, response.getStatus());
}
httpClient.close();
tcpConcentrator.close();
mutliplexedHttpServer.close();
}