directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r906633 - in /directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api: ./ operations/ operations/bind/
Date Thu, 04 Feb 2010 20:08:46 GMT
Author: elecharny
Date: Thu Feb  4 20:08:46 2010
New Revision: 906633

URL: http://svn.apache.org/viewvc?rev=906633&view=rev
Log:
o Fixed the LdapConnection tests which was blocked on an unbind operation
o Removed all the useless System.out.println in the code

Modified:
    directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
    directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java
    directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java
    directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientCompareRequestTest.java
    directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java
    directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java
    directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java
    directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java
    directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java

Modified: directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java?rev=906633&r1=906632&r2=906633&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
Thu Feb  4 20:08:46 2010
@@ -84,7 +84,7 @@
     @After
     public void unbindConnection() throws Exception
     {
-        connection.unBind();
+        connection.close();
     }
     
     

Modified: directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java?rev=906633&r1=906632&r2=906633&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java
Thu Feb  4 20:08:46 2010
@@ -83,7 +83,6 @@
     @Before
     public void setup() throws Exception
     {
-        System.out.println( "Setup -------" );
         connection = new LdapConnection( "localhost", ldapServer.getPort() );
         LdapDN bindDn = new LdapDN( "uid=admin,ou=system" );
         connection.setTimeOut( 0L );
@@ -104,7 +103,6 @@
             if ( connection != null )
             {
                 connection.close();
-                System.out.println( "Shutdown -------" );
             }
         }
         catch( Exception ioe )
@@ -133,8 +131,6 @@
 
             connection.add( entry );
         }
-
-        System.out.println( "done, searching now..." );
         
         SearchRequest sr = new SearchRequest();
         sr.setFilter( "(cn=*)" );
@@ -149,7 +145,6 @@
         {
             public void searchDone( LdapConnection connection, SearchResultDone searchResultDone
) throws LdapException
             {
-                System.out.println( "Search done" );
             }
 
 
@@ -169,7 +164,6 @@
                 {
                     int id = searchResultEntry.getMessageId();
                     assertEquals( numEntries + 2, id );
-                    System.out.println( "Abandonning message " + id );
                     connection.abandon( id );
                     abandonned.set( true );
                 }

Modified: directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java?rev=906633&r1=906632&r2=906633&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java
Thu Feb  4 20:08:46 2010
@@ -70,7 +70,6 @@
     @Before
     public void setup() throws Exception
     {
-        System.out.println( "Setup -------" );
         connection = new LdapConnection( "localhost", ldapServer.getPort() );
         LdapDN bindDn = new LdapDN( "uid=admin,ou=system" );
         connection.bind( bindDn.getName(), "secret" );
@@ -90,7 +89,6 @@
             if ( connection != null )
             {
                 connection.close();
-                System.out.println( "Shutdown -------" );
             }
         }
         catch( Exception ioe )

Modified: directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientCompareRequestTest.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientCompareRequestTest.java?rev=906633&r1=906632&r2=906633&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientCompareRequestTest.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientCompareRequestTest.java
Thu Feb  4 20:08:46 2010
@@ -65,7 +65,6 @@
     @Before
     public void setup() throws Exception
     {
-        System.out.println( "Setup -------" );
         connection = new LdapConnection( "localhost", ldapServer.getPort() );
         LdapDN bindDn = new LdapDN( "uid=admin,ou=system" );
         connection.bind( bindDn.getName(), "secret" );
@@ -85,7 +84,6 @@
             if ( connection != null )
             {
                 connection.close();
-                System.out.println( "Shutdown -------" );
             }
         }
         catch( Exception ioe )

Modified: directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java?rev=906633&r1=906632&r2=906633&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java
Thu Feb  4 20:08:46 2010
@@ -172,11 +172,14 @@
         
         assertTrue( session.exists( dn ) );
         
-        DeleteResponse response = connection.deleteTree( dn );
-        assertNotNull( response );
-        assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
-        
-        assertFalse( session.exists( dn ) );
+        if ( connection.isControlSupported( "1.2.840.113556.1.4.805" ) )
+        {
+            DeleteResponse response = connection.deleteTree( dn );
+            assertNotNull( response );
+            assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode()
);
+            
+            assertFalse( session.exists( dn ) );
+        }
     }
     
     

Modified: directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java?rev=906633&r1=906632&r2=906633&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java
Thu Feb  4 20:08:46 2010
@@ -70,7 +70,6 @@
     @Before
     public void setup() throws Exception
     {
-        System.out.println( "Setup -------" );
         connection = new LdapConnection( "localhost", ldapServer.getPort() );
         LdapDN bindDn = new LdapDN( "uid=admin,ou=system" );
         connection.bind( bindDn.getName(), "secret" );
@@ -88,7 +87,6 @@
             if ( connection != null )
             {
                 connection.close();
-                System.out.println( "Shutdown -------" );
             }
         }
         catch( Exception ioe )

Modified: directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java?rev=906633&r1=906632&r2=906633&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java
Thu Feb  4 20:08:46 2010
@@ -79,7 +79,6 @@
     @Before
     public void setup() throws Exception
     {
-        System.out.println( "Setup -------" );
         connection = new LdapConnection( "localhost", ldapServer.getPort() );
 
         LdapDN bindDn = new LdapDN( "uid=admin,ou=system" );
@@ -100,7 +99,6 @@
             if ( connection != null )
             {
                 connection.close();
-                System.out.println( "Shutdown -------" );
             }
         }
         catch( Exception ioe )
@@ -147,8 +145,6 @@
         assertFalse( session.exists( oldDn ) );
         
         assertTrue( session.exists( new LdapDN( "cn=modDn,ou=users,ou=system" ) ) );
-        
-        System.out.println( session.lookup( new LdapDN( "cn=modDn,ou=users,ou=system" ) )
);
     }
     
     

Modified: directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java?rev=906633&r1=906632&r2=906633&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java
Thu Feb  4 20:08:46 2010
@@ -72,7 +72,6 @@
     @Before
     public void setup() throws Exception
     {
-        System.out.println( "Setup -------" );
         connection = new LdapConnection( "localhost", ldapServer.getPort() );
 
         LdapDN bindDn = new LdapDN( "uid=admin,ou=system" );
@@ -93,7 +92,6 @@
             if ( connection != null )
             {
                 connection.close();
-                System.out.println( "Shutdown -------" );
             }
         }
         catch( Exception ioe )

Modified: directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java?rev=906633&r1=906632&r2=906633&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java
Thu Feb  4 20:08:46 2010
@@ -67,7 +67,6 @@
     @Before
     public void setup() throws Exception
     {
-        System.out.println( "Setup -------" );
         connection = new LdapConnection( "localhost", ldapServer.getPort() );
     }
 
@@ -83,7 +82,6 @@
             if ( connection != null )
             {
                 connection.close();
-                System.out.println( "Shutdown -------" );
             }
         }
         catch( Exception ioe )
@@ -136,7 +134,6 @@
                     assertNotNull( bindResponse );
                     assertEquals( ResultCodeEnum.SUCCESS, bindResponse.getLdapResult().getResultCode()
);
                     assertEquals( 1, bindResponse.getMessageId() );
-                    System.out.println( "Bound " + loop );
                     lock.release();
                 }
             } );
@@ -150,7 +147,6 @@
     @Test
     public void testSimpleBindAnonymous() throws Exception
     {
-        System.out.println("testSimpleBindAnonymous");
         // Try with no parameters
         BindResponse bindResponse = connection.bind();
         



Mime
View raw message