directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r986262 - /directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/
Date Tue, 17 Aug 2010 10:30:19 GMT
Author: felixk
Date: Tue Aug 17 10:30:19 2010
New Revision: 986262

URL: http://svn.apache.org/viewvc?rev=986262&view=rev
Log:
Just to make sure we don't have race conditions when one test class is overwriting the target/schema
directory of another class when running concurrent

Modified:
    directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerAddTest.java
    directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerDelTest.java
    directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerEnableDisableLoadTest.java
    directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerLoadTest.java
    directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerLoadWithDepsTest.java

Modified: directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerAddTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerAddTest.java?rev=986262&r1=986261&r2=986262&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerAddTest.java
(original)
+++ directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerAddTest.java
Tue Aug 17 10:30:19 2010
@@ -92,6 +92,9 @@ public class SchemaManagerAddTest
             workingDirectory = path.substring( 0, targetPos + 6 );
         }
 
+        // Make sure every test class has its own schema directory
+        workingDirectory = new File( workingDirectory, "SchemaManagerAddTest" ).getAbsolutePath();
+
         schemaRepository = new File( workingDirectory, "schema" );
 
         // Cleanup the target directory
@@ -106,7 +109,7 @@ public class SchemaManagerAddTest
     public static void cleanup() throws IOException
     {
         // Cleanup the target directory
-        FileUtils.deleteDirectory( schemaRepository );
+        FileUtils.deleteDirectory( schemaRepository.getParentFile() );
     }
 
 

Modified: directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerDelTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerDelTest.java?rev=986262&r1=986261&r2=986262&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerDelTest.java
(original)
+++ directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerDelTest.java
Tue Aug 17 10:30:19 2010
@@ -83,6 +83,9 @@ public class SchemaManagerDelTest
             workingDirectory = path.substring( 0, targetPos + 6 );
         }
 
+        // Make sure every test class has its own schema directory
+        workingDirectory = new File( workingDirectory, "SchemaManagerDelTest" ).getAbsolutePath();
+
         schemaRepository = new File( workingDirectory, "schema" );
 
         // Cleanup the target directory
@@ -97,7 +100,7 @@ public class SchemaManagerDelTest
     public static void cleanup() throws IOException
     {
         // Cleanup the target directory
-        FileUtils.deleteDirectory( schemaRepository );
+        FileUtils.deleteDirectory( schemaRepository.getParentFile() );
     }
 
 

Modified: directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerEnableDisableLoadTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerEnableDisableLoadTest.java?rev=986262&r1=986261&r2=986262&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerEnableDisableLoadTest.java
(original)
+++ directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerEnableDisableLoadTest.java
Tue Aug 17 10:30:19 2010
@@ -90,6 +90,9 @@ public class SchemaManagerEnableDisableL
             workingDirectory = path.substring( 0, targetPos + 6 );
         }
 
+        // Make sure every test class has its own schema directory
+        workingDirectory = new File( workingDirectory, "SchemaManagerEnableDisableLoadTest"
).getAbsolutePath();
+
         schemaRepository = new File( workingDirectory, "schema" );
 
         // Cleanup the target directory
@@ -112,7 +115,7 @@ public class SchemaManagerEnableDisableL
     public static void cleanup() throws IOException
     {
         // Cleanup the target directory
-        FileUtils.deleteDirectory( schemaRepository );
+        FileUtils.deleteDirectory( schemaRepository.getParentFile() );
     }
 
 

Modified: directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerLoadTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerLoadTest.java?rev=986262&r1=986261&r2=986262&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerLoadTest.java
(original)
+++ directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerLoadTest.java
Tue Aug 17 10:30:19 2010
@@ -189,6 +189,9 @@ public class SchemaManagerLoadTest
             workingDirectory = path.substring( 0, targetPos + 6 );
         }
 
+        // Make sure every test class has its own schema directory
+        workingDirectory = new File( workingDirectory, "SchemaManagerLoadTest" ).getAbsolutePath();
+
         schemaRepository = new File( workingDirectory, "schema" );
 
         // Cleanup the target directory
@@ -203,7 +206,7 @@ public class SchemaManagerLoadTest
     public static void cleanup() throws IOException
     {
         // Cleanup the target directory
-        FileUtils.deleteDirectory( schemaRepository );
+        FileUtils.deleteDirectory( schemaRepository.getParentFile() );
     }
 
 

Modified: directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerLoadWithDepsTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerLoadWithDepsTest.java?rev=986262&r1=986261&r2=986262&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerLoadWithDepsTest.java
(original)
+++ directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerLoadWithDepsTest.java
Tue Aug 17 10:30:19 2010
@@ -81,6 +81,9 @@ public class SchemaManagerLoadWithDepsTe
             workingDirectory = path.substring( 0, targetPos + 6 );
         }
 
+        // Make sure every test class has its own schema directory
+        workingDirectory = new File( workingDirectory, "SchemaManagerLoadWithDepsTest" ).getAbsolutePath();
+
         schemaRepository = new File( workingDirectory, "schema" );
 
         // Cleanup the target directory
@@ -95,7 +98,7 @@ public class SchemaManagerLoadWithDepsTe
     public static void cleanup() throws IOException
     {
         // Cleanup the target directory
-        FileUtils.deleteDirectory( schemaRepository );
+        FileUtils.deleteDirectory( schemaRepository.getParentFile() );
     }
 
 



Mime
View raw message