directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r209564 - /directory/network/trunk/src/test/org/apache/mina/filter/ThreadPoolFilterRegressionTest.java
Date Thu, 07 Jul 2005 03:22:53 GMT
Author: trustin
Date: Wed Jul  6 20:22:52 2005
New Revision: 209564

URL: http://svn.apache.org/viewcvs?rev=209564&view=rev
Log:
Added main() method to ThreadPoolFilterRegressionTest

Modified:
    directory/network/trunk/src/test/org/apache/mina/filter/ThreadPoolFilterRegressionTest.java

Modified: directory/network/trunk/src/test/org/apache/mina/filter/ThreadPoolFilterRegressionTest.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/test/org/apache/mina/filter/ThreadPoolFilterRegressionTest.java?rev=209564&r1=209563&r2=209564&view=diff
==============================================================================
--- directory/network/trunk/src/test/org/apache/mina/filter/ThreadPoolFilterRegressionTest.java
(original)
+++ directory/network/trunk/src/test/org/apache/mina/filter/ThreadPoolFilterRegressionTest.java
Wed Jul  6 20:22:52 2005
@@ -58,11 +58,11 @@
         final int end = sessions.length - 1;
         final ThreadPoolFilter filter = this.filter;
         
-        for( int i = 0; i < 1000000; i++ )
+        for( int i = 0; i < 1000000 ; i++ )
         {
             Integer objI = new Integer( i );
 
-            for( int j = 0; j <= end; j++ )
+            for( int j = end; j >= 0; j-- )
             {
                 filter.messageReceived( nextFilter, sessions[ j ], objI );
             }
@@ -167,7 +167,10 @@
             }
             catch( Throwable t )
             {
-                this.throwable = t;
+                if( this.throwable == null )
+                {
+                    this.throwable = t;
+                }
             }
         }
 
@@ -178,5 +181,10 @@
         public void filterWrite( IoSession session, WriteRequest writeRequest )
         {
         }
+    }
+    
+    public static void main( String[] args )
+    {
+        junit.textui.TestRunner.run( ThreadPoolFilterRegressionTest.class );
     }
 }



Mime
View raw message