threads[i] = new Thread(new Runnable() {
@Override
public void run() {
while (!done.get() && latch.getCount() > 0) {
try {
final PooledConnection pooledConnection = (PooledConnection) pooled.createConnection();
if (pooledConnection.getConnection() == null) {
LOG.info("Found broken connection.");
latch.countDown();
}
pooledConnection.close();