directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1311496 - in /directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/authz: AuthorizationServiceAsNonAdminIT.java SearchAuthorizationIT.java
Date Mon, 09 Apr 2012 22:24:14 GMT
Author: elecharny
Date: Mon Apr  9 22:24:13 2012
New Revision: 1311496

URL: http://svn.apache.org/viewvc?rev=1311496&view=rev
Log:
Closing cursors in tests

Modified:
    directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
    directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java

Modified: directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java?rev=1311496&r1=1311495&r2=1311496&view=diff
==============================================================================
--- directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
(original)
+++ directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
Mon Apr  9 22:24:13 2012
@@ -180,6 +180,8 @@ public class AuthorizationServiceAsNonAd
             {
                 fail();
             }
+            
+            cursor.close();
         }
         catch ( LdapNoPermissionException e )
         {

Modified: directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java?rev=1311496&r1=1311495&r2=1311496&view=diff
==============================================================================
--- directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java
(original)
+++ directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java
Mon Apr  9 22:24:13 2012
@@ -195,6 +195,7 @@ public class SearchAuthorizationIT exten
         }
 
         results.close();
+        
         reusableAdminCon.delete( rdn );
     }
 
@@ -319,6 +320,8 @@ public class SearchAuthorizationIT exten
             results.put( result.getDn().getName(), result );
             counter++;
         }
+        
+        cursor.close();
 
         recursivelyDelete( base );
 
@@ -348,6 +351,8 @@ public class SearchAuthorizationIT exten
             results.get();
             counter++;
         }
+        
+        results.close();
 
         assertEquals( 10, counter );
         recursivelyDelete( base );
@@ -958,7 +963,7 @@ public class SearchAuthorizationIT exten
      * @return the single search result if access is allowed or null
      * @throws Exception if the search fails w/ exception other than no permission
      */
-    private Entry checkCanSearhSubentryAs( String uid, String password, Dn dn ) throws Exception
+    private Entry checkCanSearchSubentryAs( String uid, String password, Dn dn ) throws Exception
     {
         LdapConnection userCtx = getConnectionAs( new Dn( "uid=" + uid + ",ou=users,ou=system"
), password );
         Entry result = null;
@@ -1003,7 +1008,7 @@ public class SearchAuthorizationIT exten
                 "}" );
 
         // check and see if we can access the subentry now
-        assertNotNull( checkCanSearhSubentryAs( "billyd", "billyd", new Dn( "cn=anybodySearch,ou=system"
) ) );
+        assertNotNull( checkCanSearchSubentryAs( "billyd", "billyd", new Dn( "cn=anybodySearch,ou=system"
) ) );
 
         // now add a denial to prevent all users except the admin from accessing the subentry
         addSubentryACI(
@@ -1025,7 +1030,7 @@ public class SearchAuthorizationIT exten
             "}" );
 
         // now we should not be able to access the subentry with a search
-        assertNull( checkCanSearhSubentryAs( "billyd", "billyd", new Dn( "cn=anybodySearch,ou=system"
) ) );
+        assertNull( checkCanSearchSubentryAs( "billyd", "billyd", new Dn( "cn=anybodySearch,ou=system"
) ) );
     }
 
 
@@ -1136,7 +1141,7 @@ public class SearchAuthorizationIT exten
                 "}" );
 
         // check and see if we can access the subentry now
-        assertNotNull( checkCanSearhSubentryAs( "billyd", "billyd", new Dn(
+        assertNotNull( checkCanSearchSubentryAs( "billyd", "billyd", new Dn(
             "ou=phoneBook,uid=billyd,ou=users,ou=system" ) ) );
 
         // now add a denial to prevent all users except the admin from accessing the subentry
@@ -1159,7 +1164,7 @@ public class SearchAuthorizationIT exten
                 "}" );
 
         // now we should not be able to access the subentry with a search
-        assertNull( checkCanSearhSubentryAs( "billyd", "billyd", new Dn( "ou=phoneBook,uid=billyd,ou=users,ou=system"
) ) );
+        assertNull( checkCanSearchSubentryAs( "billyd", "billyd", new Dn( "ou=phoneBook,uid=billyd,ou=users,ou=system"
) ) );
     }
 
 



Mime
View raw message