You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2010/11/24 11:07:53 UTC
svn commit: r1038545 - in
/directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ:
FrameworkRunner.java FrameworkSuite.java
Author: seelmann
Date: Wed Nov 24 10:07:53 2010
New Revision: 1038545
URL: http://svn.apache.org/viewvc?rev=1038545&view=rev
Log:
Fixed memory leak when running integration tests
Modified:
directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java
Modified: directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java?rev=1038545&r1=1038544&r2=1038545&view=diff
==============================================================================
--- directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java (original)
+++ directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java Wed Nov 24 10:07:53 2010
@@ -267,6 +267,14 @@ public class FrameworkRunner extends Blo
LOG.error( e.getLocalizedMessage() );
notifier.fireTestFailure( new Failure( getDescription(), e ) );
}
+ finally
+ {
+ // help GC to get rid of the directory service with all its references
+ suite = null;
+ classDS = null;
+ classLdapServer = null;
+ classKdcServer = null;
+ }
}
Modified: directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java?rev=1038545&r1=1038544&r2=1038545&view=diff
==============================================================================
--- directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java (original)
+++ directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java Wed Nov 24 10:07:53 2010
@@ -167,6 +167,13 @@ public class FrameworkSuite extends Suit
{
notifier.fireTestFailure(new Failure(getDescription(), e));
}
+ finally
+ {
+ // help GC to get rid of the directory service with all its references
+ directoryService = null;
+ ldapServerBuilder = null;
+ ldapServer = null;
+ }
}
/**