Ispn 4521

https://issues.jboss.org/browse/ISPN-4521

I am pretty certain the cause of the replication failures was actually https://github.com/wburns/infinispan/commit/d61c4b8e4b741c8ab280bb9824167857f5ae2db0#diff-36927bd3047e2cf4f42359fb4acaa503R36 in that it could have a miss overlapping with the schedule.

I have also updated all the test threading to use pooling for tests and also fixed some various issues with CountDownLatches used erroneously as ways to have threads run at about the same time.
Yes definitely,  good catch
On Jul 21, 2014 1:24 PM, "Dan Berindei" <notifications@github.com> wrote:

> In core/src/test/java/org/infinispan/test/AbstractInfinispanTest.java:
>
> >     public static final TimeService TIME_SERVICE = new DefaultTimeService();
> >
> >     @AfterTest(alwaysRun = true)
> >     protected void killSpawnedThreads() {
> > -      for (Thread t : spawnedThreads) {
> > -         if (t.isAlive())
> > +      List<Runnable> runnables = defaultExecutorService.shutdownNow();
> > +      log.errorf("There were runnables %s left uncompleted in test %s", runnables, getClass().getSimpleName());
>
> We should only log this if runnables is not empty.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/infinispan/infinispan/pull/2728/files#r15185926>.
>