[jboss-cvs] JBossAS SVN: r64754 - trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/unit.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Aug 21 18:24:27 EDT 2007


Author: bdecoste
Date: 2007-08-21 18:24:26 -0400 (Tue, 21 Aug 2007)
New Revision: 64754

Modified:
   trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java
Log:
fixed testConcurrentClusteredTimeoutRemoval infinite loop

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java	2007-08-21 21:24:38 UTC (rev 64753)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java	2007-08-21 22:24:26 UTC (rev 64754)
@@ -123,8 +123,8 @@
       public Exception ex;
       private int id;
       private int wait;
-      public Exception e;
       public boolean removed = false;
+      public Exception failure = null;
       
       public ConcurrentStatefulTimeoutClient(int id, int wait)
       {
@@ -165,7 +165,7 @@
             }
             catch (Exception e)
             {
-               this.e = e;
+               failure = e;
             }
          }
       }
@@ -506,9 +506,12 @@
       while (!allRemoved)
       {
          int i = 0;
-         while (i < numThreads && clients[i].removed)
+         while (i < numThreads && clients[i].removed && client[i].failure == null)
             ++i;
          
+         if (client[i].failure != null)
+            throw client[i].failure;
+         
          System.out.println("----- removed " + i);
          
          if (i == numThreads)




More information about the jboss-cvs-commits mailing list