@Ignore( "doesn't run on hudson" )
@Test
public void shouldClientsToRunConncurrentlyWithMultipleConnectionInPool() throws Exception {
int numConnectionsInPool = 10;
int numClients = 50;
RepositoryConnectionPool pool = new RepositoryConnectionPool(source);
pool.setCorePoolSize(numConnectionsInPool);
pool.setMaximumPoolSize(numConnectionsInPool);
RepositoryOperation.Factory<Integer> operationFactory = RepositorySourceLoadHarness.createMultipleLoadOperationFactory(20);
List<Future<Integer>> results = runLoadTest(context, pool, numClients, 200, TimeUnit.MILLISECONDS, operationFactory);
int total = 0;
for (Future<Integer> result : results) {
assertThat(result.isDone(), is(true));
if (result.isDone()) total += result.get();
}
assertThat(total, is(20 * numClients));
pool.shutdown();
pool.awaitTermination(4, TimeUnit.SECONDS);
}