directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1227543 - /directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/
Date Thu, 05 Jan 2012 10:27:40 GMT
Author: elecharny
Date: Thu Jan  5 10:27:39 2012
New Revision: 1227543

URL: http://svn.apache.org/viewvc?rev=1227543&view=rev
Log:
Deleted the Utils class, used commons-io instead

Removed:
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/Utils.java
Modified:
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/DefaultTxnManagerTest.java
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/EntryUpdateMergeTest.java
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/IndexCursorWrapperTest.java
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongComparator.java
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongSerializer.java
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnConflicTest.java
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnIndexCursorTest.java

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/DefaultTxnManagerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/DefaultTxnManagerTest.java?rev=1227543&r1=1227542&r2=1227543&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/DefaultTxnManagerTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/DefaultTxnManagerTest.java
Thu Jan  5 10:27:39 2012
@@ -19,9 +19,15 @@
  */
 package org.apache.directory.server.core.shared.txn;
 
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.io.File;
 import java.io.IOException;
+import java.util.List;
 
+import org.apache.commons.io.FileUtils;
 import org.apache.directory.server.core.api.txn.TxnConflictException;
 import org.junit.After;
 import org.junit.Before;
@@ -29,12 +35,11 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
-import java.util.List;
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
 
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class DefaultTxnManagerTest
 {
     /** Log buffer size : 4096 bytes */
@@ -84,7 +89,7 @@ public class DefaultTxnManagerTest
     @After
     public void teardown() throws IOException
     {
-        Utils.deleteDirectory( new File( getLogFolder() ) );
+        FileUtils.deleteDirectory( new File( getLogFolder() ) );
     }
 
 

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/EntryUpdateMergeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/EntryUpdateMergeTest.java?rev=1227543&r1=1227542&r2=1227543&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/EntryUpdateMergeTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/EntryUpdateMergeTest.java
Thu Jan  5 10:27:39 2012
@@ -20,13 +20,19 @@
 package org.apache.directory.server.core.shared.txn;
 
 
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.UUID;
 
-import org.apache.directory.shared.ldap.model.name.Dn;
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
-import org.apache.directory.shared.ldap.model.schema.SchemaManager;
+import org.apache.commons.io.FileUtils;
+import org.apache.directory.server.core.api.log.InvalidLogException;
+import org.apache.directory.server.core.api.txn.TxnLogManager;
+import org.apache.directory.server.core.shared.txn.logedit.DataChangeContainer;
+import org.apache.directory.server.core.shared.txn.logedit.EntryAddDelete;
+import org.apache.directory.server.core.shared.txn.logedit.EntryChange;
 import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
@@ -34,25 +40,21 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
+import org.apache.directory.shared.ldap.model.name.Dn;
+import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager;
-
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
-import org.junit.rules.TemporaryFolder;
 import org.junit.Test;
-
-import org.apache.directory.server.core.api.log.InvalidLogException;
-import org.apache.directory.server.core.shared.txn.logedit.EntryChange;
-import org.apache.directory.server.core.shared.txn.logedit.EntryAddDelete;
-import org.apache.directory.server.core.shared.txn.logedit.DataChangeContainer;
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import org.apache.directory.server.core.api.txn.TxnLogManager;
+import org.junit.rules.TemporaryFolder;
 
 
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class EntryUpdateMergeTest
 {
     /** Test partition Dn */
@@ -206,8 +208,8 @@ public class EntryUpdateMergeTest
             e.printStackTrace();
             fail();
         }
-        
-        Utils.deleteDirectory( new File( getLogFolder() ) );
+
+        FileUtils.deleteDirectory( new File( getLogFolder() ) );
     }
 
 

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/IndexCursorWrapperTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/IndexCursorWrapperTest.java?rev=1227543&r1=1227542&r2=1227543&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/IndexCursorWrapperTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/IndexCursorWrapperTest.java
Thu Jan  5 10:27:39 2012
@@ -28,6 +28,7 @@ import java.io.IOException;
 import java.util.TreeSet;
 import java.util.UUID;
 
+import org.apache.commons.io.FileUtils;
 import org.apache.directory.server.core.api.log.InvalidLogException;
 import org.apache.directory.server.core.api.partition.index.ForwardIndexComparator;
 import org.apache.directory.server.core.api.partition.index.ForwardIndexEntry;
@@ -46,6 +47,10 @@ import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
 
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class IndexCursorWrapperTest
 {
     /** Test partition Dn */
@@ -212,7 +217,7 @@ public class IndexCursorWrapperTest
     @After
     public void teardown() throws IOException
     {
-        Utils.deleteDirectory( new File( getLogFolder() ) );
+        FileUtils.deleteDirectory( new File( getLogFolder() ) );
 
         try
         {

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongComparator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongComparator.java?rev=1227543&r1=1227542&r2=1227543&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongComparator.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongComparator.java
Thu Jan  5 10:27:39 2012
@@ -23,6 +23,10 @@ package org.apache.directory.server.core
 import java.util.Comparator;
 
 
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class LongComparator implements Comparator<Long>
 {
     public static final LongComparator INSTANCE = new LongComparator();

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongSerializer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongSerializer.java?rev=1227543&r1=1227542&r2=1227543&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongSerializer.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongSerializer.java
Thu Jan  5 10:27:39 2012
@@ -21,9 +21,14 @@ package org.apache.directory.server.core
 
 
 import java.io.IOException;
+
 import org.apache.directory.server.core.api.partition.index.Serializer;
 
 
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class LongSerializer implements Serializer
 {
     public static final LongSerializer INSTANCE = new LongSerializer();

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnConflicTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnConflicTest.java?rev=1227543&r1=1227542&r2=1227543&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnConflicTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnConflicTest.java
Thu Jan  5 10:27:39 2012
@@ -20,11 +20,15 @@
 package org.apache.directory.server.core.shared.txn;
 
 
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.io.File;
 import java.io.IOException;
 
-import org.apache.directory.server.core.api.txn.TxnLogManager;
+import org.apache.commons.io.FileUtils;
 import org.apache.directory.server.core.api.log.InvalidLogException;
+import org.apache.directory.server.core.api.txn.TxnLogManager;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.junit.After;
@@ -33,10 +37,11 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
 
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class TxnConflicTest
 {
     /** Log buffer size : 4096 bytes */
@@ -85,11 +90,12 @@ public class TxnConflicTest
             fail();
         }
     }
-    
+
+
     @After
     public void teardown() throws IOException
     {
-        Utils.deleteDirectory( new File( getLogFolder() ) );
+        FileUtils.deleteDirectory( new File( getLogFolder() ) );
     }
 
 

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnIndexCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnIndexCursorTest.java?rev=1227543&r1=1227542&r2=1227543&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnIndexCursorTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnIndexCursorTest.java
Thu Jan  5 10:27:39 2012
@@ -20,21 +20,24 @@
 package org.apache.directory.server.core.shared.txn;
 
 
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.util.TreeSet;
 import java.util.UUID;
 
-import org.apache.directory.server.core.api.partition.index.IndexEntry;
-import org.apache.directory.server.core.api.partition.index.ForwardIndexEntry;
 import org.apache.directory.server.core.api.partition.index.ForwardIndexComparator;
-
+import org.apache.directory.server.core.api.partition.index.ForwardIndexEntry;
+import org.apache.directory.server.core.api.partition.index.IndexEntry;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
 
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class TxnIndexCursorTest
 {
     /** index entry comparator */
@@ -52,6 +55,7 @@ public class TxnIndexCursorTest
     /** UUID string */
     UUID baseUUID = UUID.fromString( "00000000-0000-0000-0000-000000000001" );
 
+
     @Before
     public void setup()
     {
@@ -77,7 +81,7 @@ public class TxnIndexCursorTest
             }
         }
 
-        cursor = new TxnIndexCursor( changedSet, true, null, null, ( ForwardIndexComparator<Object>
)comparator );
+        cursor = new TxnIndexCursor( changedSet, true, null, null, ( ForwardIndexComparator<Object>
) comparator );
 
     }
 
@@ -223,7 +227,8 @@ public class TxnIndexCursorTest
     @Test
     public void testLockDownByExistingKey()
     {
-        onlyKeyCursor = new TxnIndexCursor( changedSet, true, new Long( 7 ), null, ( ForwardIndexComparator<Object>
)comparator );
+        onlyKeyCursor = new TxnIndexCursor( changedSet, true, new Long( 7 ), null,
+            ( ForwardIndexComparator<Object> ) comparator );
         try
         {
             onlyKeyCursor.beforeFirst();
@@ -275,7 +280,8 @@ public class TxnIndexCursorTest
     @Test
     public void testLockDownByNonExistingKey()
     {
-        onlyKeyCursor = new TxnIndexCursor( changedSet, true, new Long( 5 ), null, ( ForwardIndexComparator<Object>
)comparator );
+        onlyKeyCursor = new TxnIndexCursor( changedSet, true, new Long( 5 ), null,
+            ( ForwardIndexComparator<Object> ) comparator );
         try
         {
             onlyKeyCursor.beforeFirst();
@@ -288,13 +294,14 @@ public class TxnIndexCursorTest
             fail();
         }
     }
-    
+
+
     private UUID getUUIDString( int idx )
     {
         long low = baseUUID.getLeastSignificantBits();
         long high = baseUUID.getMostSignificantBits();
         low = low + idx;
-        
+
         return new UUID( high, low );
     }
 }



Mime
View raw message