directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1029128 - /directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/ChangePasswordConfigReaderTest.java
Date Sat, 30 Oct 2010 17:32:56 GMT
Author: kayyagari
Date: Sat Oct 30 17:32:56 2010
New Revision: 1029128

URL: http://svn.apache.org/viewvc?rev=1029128&view=rev
Log:
o removing workdir after the execution of tests

Modified:
    directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/ChangePasswordConfigReaderTest.java

Modified: directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/ChangePasswordConfigReaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/ChangePasswordConfigReaderTest.java?rev=1029128&r1=1029127&r2=1029128&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/ChangePasswordConfigReaderTest.java
(original)
+++ directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/ChangePasswordConfigReaderTest.java
Sat Oct 30 17:32:56 2010
@@ -40,6 +40,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager;
 import org.apache.directory.shared.ldap.schema.registries.SchemaLoader;
 import org.apache.directory.shared.ldap.util.LdapExceptionUtils;
+import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -54,7 +55,7 @@ import org.junit.runner.RunWith;
 @Concurrent()
 public class ChangePasswordConfigReaderTest
 {
-    private static File workDir = new File( System.getProperty( "java.io.tmpdir" ) + "/server-work"
);
+    private static File workDir;
 
     private static SchemaManager schemaManager;
 
@@ -62,7 +63,7 @@ public class ChangePasswordConfigReaderT
     @BeforeClass
     public static void readConfig() throws Exception
     {
-        File workDir = new File( System.getProperty( "java.io.tmpdir" ) + "/server-work"
);
+        workDir = new File( System.getProperty( "java.io.tmpdir" ) + "/server-work-" + ChangePasswordConfigReaderTest.class.getSimpleName()
);
         FileUtils.deleteDirectory( workDir );
         workDir.mkdir();
 
@@ -94,7 +95,14 @@ public class ChangePasswordConfigReaderT
         }
     }
 
+    
+    @AfterClass
+    public static void cleanup() throws Exception
+    {
+        FileUtils.deleteDirectory( workDir );
+    }
 
+    
     @Test
     public void testChangePasswordServer() throws Exception
     {



Mime
View raw message