You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2020/12/24 09:46:38 UTC

[directory-server] branch master updated: Close the reader after the tests have been run

This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-server.git


The following commit(s) were added to refs/heads/master by this push:
     new ab355ea  Close the reader after the tests have been run
ab355ea is described below

commit ab355ead3210fd84bd0480009fa57d1d9b2fc1d4
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Thu Dec 24 10:46:27 2020 +0100

    Close the reader after the tests have been run
---
 .../server/core/partition/ldif/SingleFileLdifPartitionTest.java  | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartitionTest.java b/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartitionTest.java
index 2437f4e..0ea8b0f 100644
--- a/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartitionTest.java
+++ b/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartitionTest.java
@@ -90,6 +90,7 @@ import org.apache.directory.server.core.api.interceptor.context.SearchOperationC
 import org.apache.directory.server.core.api.normalization.FilterNormalizingVisitor;
 import org.apache.directory.server.core.api.partition.PartitionTxn;
 import org.apache.directory.server.core.shared.DefaultDnFactory;
+import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Disabled;
@@ -150,7 +151,6 @@ public class SingleFileLdifPartitionTest
         }
 
         reader = new LdifReader( schemaManager );
-
         defaultCSNFactory = new CsnFactory( 0 );
 
         Dn adminDn = new Dn( schemaManager, "uid=admin,ou=system" );
@@ -174,6 +174,13 @@ public class SingleFileLdifPartitionTest
 
         dnFactory = new DefaultDnFactory( schemaManager, 100 );
     }
+    
+    
+    @AfterAll
+    public static void shutdown() throws IOException
+    {
+        reader.close();
+    }
 
 
     @BeforeEach