[jboss-cvs] JBoss Messaging SVN: r4654 - trunk/tests/src/org/jboss/messaging/tests/unit/util.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jul 7 13:02:09 EDT 2008


Author: clebert.suconic at jboss.com
Date: 2008-07-07 13:02:09 -0400 (Mon, 07 Jul 2008)
New Revision: 4654

Modified:
   trunk/tests/src/org/jboss/messaging/tests/unit/util/VariableLatchTest.java
Log:
I don't need this many loops for this test... it would run a little faster without it

Modified: trunk/tests/src/org/jboss/messaging/tests/unit/util/VariableLatchTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/util/VariableLatchTest.java	2008-07-07 16:53:46 UTC (rev 4653)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/util/VariableLatchTest.java	2008-07-07 17:02:09 UTC (rev 4654)
@@ -41,13 +41,13 @@
    {
       VariableLatch latch = new VariableLatch();
       
-      for (int i = 1; i <= 10000; i++)
+      for (int i = 1; i <= 100; i++)
       {
          latch.up();
          assertEquals(i, latch.getCount());
       }
       
-      for (int i = 10000; i > 0; i--)
+      for (int i = 100; i > 0; i--)
       {
          assertEquals(i, latch.getCount());
          latch.down();
@@ -75,7 +75,7 @@
       latch.up(); // We hold at least one, so ThreadWaits won't go away
       
       final int numberOfThreads = 100;
-      final int numberOfAdds = 1000;
+      final int numberOfAdds = 100;
       
       class ThreadWait extends Thread
       {
@@ -86,7 +86,8 @@
             try
             {
                latch.waitCompletion(5000);
-            } catch (Exception e)
+            } 
+            catch (Exception e)
             {
                log.error(e);
             }
@@ -117,7 +118,8 @@
                {
                   latch.up();
                }
-            } catch (Exception e)
+            } 
+            catch (Exception e)
             {
                log.error(e.getMessage(), e);
             }
@@ -176,7 +178,8 @@
                {
                   latch.down();
                }
-            } catch (Exception e)
+            } 
+            catch (Exception e)
             {
                log.error(e.getMessage(), e);
             }
@@ -242,7 +245,8 @@
             try
             {
                latch.waitCompletion(1000);
-            } catch (Exception e)
+            } 
+            catch (Exception e)
             {
                log.error(e);
                this.e = e;




More information about the jboss-cvs-commits mailing list