directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r569244 - /directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java
Date Fri, 24 Aug 2007 04:48:22 GMT
Author: elecharny
Date: Thu Aug 23 21:48:21 2007
New Revision: 569244

URL: http://svn.apache.org/viewvc?rev=569244&view=rev
Log:
Removed the insane performance test ... It was run 100 000 times !

Modified:
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java?rev=569244&r1=569243&r2=569244&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java
Thu Aug 23 21:48:21 2007
@@ -240,26 +240,18 @@
         // Allocate a BindRequest Container
         IAsn1Container ldapMessageContainer = new LdapMessageContainer();
 
-        long t0 = System.currentTimeMillis();
-        
-        for ( int i = 0; i < 100000; i++ )
+        try
+        {
+            ((LdapMessageContainer)ldapMessageContainer).clean();
+            ldapDecoder.decode( stream, ldapMessageContainer );
+        }
+        catch ( DecoderException de )
         {
-	        try
-	        {
-	            ((LdapMessageContainer)ldapMessageContainer).clean();
-	            ldapDecoder.decode( stream, ldapMessageContainer );
-	        }
-	        catch ( DecoderException de )
-	        {
-	            de.printStackTrace();
-	            fail( de.getMessage() );
-	        }
-	        
-	        stream.flip();
+            de.printStackTrace();
+            fail( de.getMessage() );
         }
-        long t1 = System.currentTimeMillis();
-
-        System.out.println( "Delta : " + (t1 - t0) );
+        
+        stream.flip();
         
         LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
         SearchResultReference searchResultReference = message.getSearchResultReference();



Mime
View raw message