directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1038545 - in /directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ: FrameworkRunner.java FrameworkSuite.java
Date Wed, 24 Nov 2010 10:07:53 GMT
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;
+        }
     }
 
     /**



Mime
View raw message