[jboss-cvs] JBossAS SVN: r64757 - branches/Branch_4_2/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:56:27 EDT 2007


Author: bdecoste
Date: 2007-08-21 18:56:27 -0400 (Tue, 21 Aug 2007)
New Revision: 64757

Modified:
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java
Log:
fixed infinte loop in testConcurrentClusteredTimeoutRemoval

Modified: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java	2007-08-21 22:55:20 UTC (rev 64756)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java	2007-08-21 22:56:27 UTC (rev 64757)
@@ -123,7 +123,7 @@
       public Exception ex;
       private int id;
       private int wait;
-      public Exception e;
+      public Exception failure;
       public boolean removed = false;
       
       public ConcurrentStatefulTimeoutClient(int id, int wait)
@@ -165,7 +165,7 @@
             }
             catch (Exception e)
             {
-               this.e = e;
+               this.failure = e;
             }
          }
       }
@@ -511,9 +511,12 @@
       while (!allRemoved)
       {
          int i = 0;
-         while (i < numThreads && clients[i].removed)
+         while (i < numThreads && clients[i].removed && clients[i].failure == null)
             ++i;
          
+         if (i < numThreads && clients[i].failure != null)
+            throw clients[i].failure;
+         
          System.out.println("----- removed " + i);
          
          if (i == numThreads)




More information about the jboss-cvs-commits mailing list