[infinispan-commits] Infinispan SVN: r700 - trunk/core/src/test/java/org/infinispan/util/concurrent.

infinispan-commits at lists.jboss.org infinispan-commits at lists.jboss.org
Mon Aug 17 09:47:40 EDT 2009


Author: manik.surtani at jboss.com
Date: 2009-08-17 09:47:40 -0400 (Mon, 17 Aug 2009)
New Revision: 700

Modified:
   trunk/core/src/test/java/org/infinispan/util/concurrent/WatchableValueTest.java
Log:
More robust inter thread comms

Modified: trunk/core/src/test/java/org/infinispan/util/concurrent/WatchableValueTest.java
===================================================================
--- trunk/core/src/test/java/org/infinispan/util/concurrent/WatchableValueTest.java	2009-08-17 13:42:59 UTC (rev 699)
+++ trunk/core/src/test/java/org/infinispan/util/concurrent/WatchableValueTest.java	2009-08-17 13:47:40 UTC (rev 700)
@@ -8,6 +8,7 @@
 
 @Test(groups = "unit", testName = "util.concurrent.WatchableValueTest")
 public class WatchableValueTest {
+   @Test(invocationCount = 250, skipFailedInvocations = true)
    public void testNotifier() throws InterruptedException {
       final WatchableValue vn = new WatchableValue(10);
       final List<Integer> threadsCompleted = new LinkedList<Integer>();
@@ -18,8 +19,8 @@
             try {
                threadsReady.countDown();
                vn.awaitValue(50);
+               threadsCompleted.add(1);
                valueSet1.countDown();
-               threadsCompleted.add(1);
             } catch (Exception e) {
                throw new RuntimeException(e);
             }
@@ -31,8 +32,8 @@
             try {
                threadsReady.countDown();
                vn.awaitValue(50);
+               threadsCompleted.add(2);
                valueSet1.countDown();
-               threadsCompleted.add(2);
             } catch (Exception e) {
                throw new RuntimeException(e);
             }
@@ -44,8 +45,8 @@
             try {
                threadsReady.countDown();
                vn.awaitValue(40);
+               threadsCompleted.add(3);
                valueSet2.countDown();
-               threadsCompleted.add(3);
             } catch (Exception e) {
                throw new RuntimeException(e);
             }



More information about the infinispan-commits mailing list