directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1311692 - /directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java
Date Tue, 10 Apr 2012 12:22:11 GMT
Author: elecharny
Date: Tue Apr 10 12:22:10 2012
New Revision: 1311692

URL: http://svn.apache.org/viewvc?rev=1311692&view=rev
Log:
Closed the NamingEnumeration

Modified:
    directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java

Modified: directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java?rev=1311692&r1=1311691&r2=1311692&view=diff
==============================================================================
--- directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java
(original)
+++ directory/apacheds/branches/index-work/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java
Tue Apr 10 12:22:10 2012
@@ -244,6 +244,8 @@ public class SchemaServiceIT extends Abs
             persons.put( result.getName(), result.getAttributes() );
         }
 
+        results.close();
+
         // admin is extra
         assertEquals( 4, persons.size() );
 
@@ -288,6 +290,8 @@ public class SchemaServiceIT extends Abs
             orgPersons.put( result.getName(), result.getAttributes() );
         }
 
+        results.close();
+
         // admin is extra
         assertEquals( 3, orgPersons.size() );
 
@@ -325,6 +329,8 @@ public class SchemaServiceIT extends Abs
             inetOrgPersons.put( result.getName(), result.getAttributes() );
         }
 
+        results.close();
+
         // admin is extra
         assertEquals( 2, inetOrgPersons.size() );
 
@@ -355,6 +361,8 @@ public class SchemaServiceIT extends Abs
             subSchemaEntry.put( result.getName(), result.getAttributes() );
         }
 
+        results.close();
+
         // We should have only one entry in the result
         assertEquals( 1, subSchemaEntry.size() );
 
@@ -392,6 +400,8 @@ public class SchemaServiceIT extends Abs
             subSchemaEntry.put( result.getName(), result.getAttributes() );
         }
 
+        results.close();
+
         // We should have only one entry in the result
         assertEquals( 1, subSchemaEntry.size() );
 
@@ -422,6 +432,8 @@ public class SchemaServiceIT extends Abs
             subSchemaEntry.put( result.getName(), result.getAttributes() );
         }
 
+        results.close();
+
         // We should have only one entry in the result
         assertEquals( 1, subSchemaEntry.size() );
 
@@ -474,6 +486,8 @@ public class SchemaServiceIT extends Abs
             subSchemaEntry.put( result.getName(), result.getAttributes() );
         }
 
+        results.close();
+
         // We should have only one entry in the result
         assertEquals( 1, subSchemaEntry.size() );
 
@@ -520,6 +534,8 @@ public class SchemaServiceIT extends Abs
             subSchemaEntry.put( result.getName(), result.getAttributes() );
         }
 
+        results.close();
+
         // We should have no entry in the result
         assertEquals( 0, subSchemaEntry.size() );
     }
@@ -543,6 +559,8 @@ public class SchemaServiceIT extends Abs
             subSchemaEntry.put( result.getName(), result.getAttributes() );
         }
 
+        results.close();
+
         // We should have only one entry in the result
         assertEquals( 1, subSchemaEntry.size() );
 
@@ -597,6 +615,8 @@ public class SchemaServiceIT extends Abs
             subSchemaEntry.put( result.getName(), result.getAttributes() );
         }
 
+        results.close();
+
         // We should have only one entry in the result
         assertEquals( 1, subSchemaEntry.size() );
 
@@ -648,6 +668,8 @@ public class SchemaServiceIT extends Abs
             subSchemaEntry.put( result.getName(), result.getAttributes() );
         }
 
+        results.close();
+
         // We should have no entry in the result
         assertEquals( 0, subSchemaEntry.size() );
     }
@@ -671,6 +693,8 @@ public class SchemaServiceIT extends Abs
             subSchemaEntry.put( result.getName(), result.getAttributes() );
         }
 
+        results.close();
+
         // We should have no entry in the result
         assertEquals( 0, subSchemaEntry.size() );
     }
@@ -696,6 +720,8 @@ public class SchemaServiceIT extends Abs
             persons.put( result.getName(), result.getAttributes() );
         }
 
+        results.close();
+
         // admin is extra
         assertEquals( 1, persons.size() );
 
@@ -740,6 +766,8 @@ public class SchemaServiceIT extends Abs
             persons.put( result.getName(), result.getAttributes() );
         }
 
+        results.close();
+
         // admin is extra
         assertEquals( 4, persons.size() );
 
@@ -789,6 +817,8 @@ public class SchemaServiceIT extends Abs
             SearchResult result = results.next();
             persons.put( result.getName(), result.getAttributes() );
         }
+        
+        results.close();
 
         // admin is extra
         assertEquals( 4, persons.size() );
@@ -839,6 +869,8 @@ public class SchemaServiceIT extends Abs
             SearchResult result = results.next();
             persons.put( result.getName(), result.getAttributes() );
         }
+        
+        results.close();
 
         // admin is extra
         assertEquals( 4, persons.size() );
@@ -889,6 +921,8 @@ public class SchemaServiceIT extends Abs
             SearchResult result = results.next();
             persons.put( result.getName(), result.getAttributes() );
         }
+        
+        results.close();
 
         assertEquals( 3, persons.size() );
 
@@ -933,16 +967,18 @@ public class SchemaServiceIT extends Abs
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
         NamingEnumeration<SearchResult> results = schemaRoot.search( "", "(objectClass=top)",
controls );
         assertTrue( "Expected some results", results.hasMore() );
+        results.close();
 
         controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
         results = schemaRoot.search( "", "(objectClass=metaAttributeType)", controls );
         assertTrue( "Expected some results", results.hasMore() );
+        results.close();
 
         controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
         results = schemaRoot.search( "", "(objectClass=metaTop)", controls );
         assertTrue( "Expected some results", results.hasMore() );
+        results.close();
     }
-
 }



Mime
View raw message