use of io.undertow.testutils.HttpOneOnly in project undertow by undertow-io.
the class AbstractLoadBalancingProxyTestCase method testOldBackend.
@Test
@HttpOneOnly
public void testOldBackend() throws IOException {
TestHttpClient client = new TestHttpClient();
try {
for (int i = 0; i < 10; ++i) {
HttpGet get = new HttpGet(DefaultServer.getDefaultServerURL() + "/old");
HttpResponse result = client.execute(get);
Assert.assertEquals(StatusCodes.OK, result.getStatusLine().getStatusCode());
Assert.assertEquals(RESPONSE_BODY, HttpClientUtils.readResponse(result));
}
} finally {
client.getConnectionManager().shutdown();
}
}
Aggregations