@Test
public void testRetryEmptyPool() {
ConnectionPool<TestClient> pool = createPool();
RetryPolicy retry = new RunOnce();
try {
pool.executeWithFailover(dummyOperation, retry);
Assert.fail();
} catch (ConnectionException e) {
Assert.assertEquals(1, retry.getAttemptCount());
LOG.error(e);
}
retry = new ConstantBackoff(1, 10);
try {
pool.executeWithFailover(dummyOperation, retry);
Assert.fail();
} catch (ConnectionException e) {
Assert.assertEquals(10, retry.getAttemptCount());
LOG.info(e);
}
}