directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lucasthei...@apache.org
Subject svn commit: r1637484 - in /directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api: LdapConnectionPoolTest.java LdapConnectionTest.java
Date Fri, 07 Nov 2014 23:33:10 GMT
Author: lucastheisen
Date: Fri Nov  7 23:33:09 2014
New Revision: 1637484

URL: http://svn.apache.org/r1637484
Log:
moved testRebindNoPool to LdapConnectionTest as implied by the name

Modified:
    directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionPoolTest.java
    directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionPoolTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionPoolTest.java?rev=1637484&r1=1637483&r2=1637484&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionPoolTest.java
(original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionPoolTest.java
Fri Nov  7 23:33:09 2014
@@ -166,12 +166,12 @@ public class LdapConnectionPoolTest exte
         long t0 = System.currentTimeMillis();
         long t00 = t0;
 
-        for ( int i = 0; i < 1000000; i++ )
+        for ( int i = 0; i < 10000; i++ )
         {
             // First, unbind
             try
             {
-                if ( i % 10000 == 0 )
+                if ( i % 100 == 0 )
                 {
                     long t01 = t00;
                     t00 = System.currentTimeMillis();
@@ -199,6 +199,7 @@ public class LdapConnectionPoolTest exte
             }
             catch ( Exception e )
             {
+                System.out.println( "Failure after " + i + " iterations" );
                 e.printStackTrace();
                 throw e;
             }
@@ -231,60 +232,6 @@ public class LdapConnectionPoolTest exte
 
 
     @Test
-    @Ignore
-    public void testRebindNoPool() throws Exception
-    {
-        LdapConnection connection = new LdapNetworkConnection( DEFAULT_HOST, getLdapServer().getPort()
);
-        connection.bind( ServerDNConstants.ADMIN_SYSTEM_DN, "secret" );
-
-        for ( int i = 0; i < 10000; i++ )
-        {
-            if ( i % 100 == 0 )
-            {
-                System.out.println( "Iteration # " + i );
-            }
-            // First, unbind
-            try
-            {
-                connection.unBind();
-            }
-            catch ( Exception e )
-            {
-                e.printStackTrace();
-                throw e;
-            }
-
-            //Thread.sleep( 5 );
-
-            // Don't close the connection, we want to reuse it
-            // Then bind again
-            try
-            {
-                connection.bind( ServerDNConstants.ADMIN_SYSTEM_DN, "secret" );
-            }
-            catch ( Exception e )
-            {
-                System.out.println( "Failure after " + i + " iterations" );
-                e.printStackTrace();
-                throw e;
-            }
-        }
-
-        // terminate with an unbind
-        try
-        {
-            connection.unBind();
-        }
-        catch ( Exception e )
-        {
-            e.printStackTrace();
-        }
-
-        connection.close();
-    }
-
-
-    @Test
     public void testSmallPool() throws Exception
     {
         LdapConnectionConfig config = new LdapConnectionConfig();

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java?rev=1637484&r1=1637483&r2=1637484&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
(original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
Fri Nov  7 23:33:09 2014
@@ -110,6 +110,60 @@ public class LdapConnectionTest extends 
 
 
     @Test
+    @Ignore
+    public void testRebindNoPool() throws Exception
+    {
+        LdapConnection connection = new LdapNetworkConnection( DEFAULT_HOST, getLdapServer().getPort()
);
+        connection.bind( ServerDNConstants.ADMIN_SYSTEM_DN, "secret" );
+
+        for ( int i = 0; i < 10000; i++ )
+        {
+            if ( i % 100 == 0 )
+            {
+                System.out.println( "Iteration # " + i );
+            }
+            // First, unbind
+            try
+            {
+                connection.unBind();
+            }
+            catch ( Exception e )
+            {
+                e.printStackTrace();
+                throw e;
+            }
+
+            //Thread.sleep( 5 );
+
+            // Don't close the connection, we want to reuse it
+            // Then bind again
+            try
+            {
+                connection.bind( ServerDNConstants.ADMIN_SYSTEM_DN, "secret" );
+            }
+            catch ( Exception e )
+            {
+                System.out.println( "Failure after " + i + " iterations" );
+                e.printStackTrace();
+                throw e;
+            }
+        }
+
+        // terminate with an unbind
+        try
+        {
+            connection.unBind();
+        }
+        catch ( Exception e )
+        {
+            e.printStackTrace();
+        }
+
+        connection.close();
+    }
+
+
+    @Test
     public void testGetSupportedControls() throws Exception
     {
         List<String> controlList = connection.getSupportedControls();



Mime
View raw message