directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1221261 - in /directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared: log/ txn/
Date Tue, 20 Dec 2011 13:57:32 GMT
Author: elecharny
Date: Tue Dec 20 13:57:32 2011
New Revision: 1221261

URL: http://svn.apache.org/viewvc?rev=1221261&view=rev
Log:
o Fixed a NPE in Junit
o Remove duseless imports

Modified:
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogFlushScanTest.java
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogTest.java
    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/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/log/LogFlushScanTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogFlushScanTest.java?rev=1221261&r1=1221260&r2=1221261&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogFlushScanTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogFlushScanTest.java
Tue Dec 20 13:57:32 2011
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.server.core.shared.log;
 
+import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
 
@@ -64,7 +65,8 @@ public class LogFlushScanTest
      */
     private String getLogFolder( ) throws IOException
     {
-        String file = folder.newFolder( LOG_SUFFIX ).getAbsolutePath();
+        File newFolder = folder.newFolder( LOG_SUFFIX );
+        String file = newFolder.getAbsolutePath();
         
         return file;
     }

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogTest.java?rev=1221261&r1=1221260&r2=1221261&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogTest.java
Tue Dec 20 13:57:32 2011
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertTru
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
+import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
 
@@ -57,7 +58,8 @@ public class LogTest
      */
     private String getLogFolder( ) throws IOException
     {
-        String file = folder.newFolder( LOG_SUFFIX ).getAbsolutePath();
+        File newFolder = folder.newFolder( LOG_SUFFIX );
+        String file = newFolder.getAbsolutePath();
         
         return file;
     }

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=1221261&r1=1221260&r2=1221261&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
Tue Dec 20 13:57:32 2011
@@ -19,12 +19,9 @@
  */
 package org.apache.directory.server.core.shared.txn;
 
-import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.IOException;
-import java.io.ObjectOutputStream;
 
-import org.apache.directory.server.core.api.log.InvalidLogException;
 import org.apache.directory.server.core.api.txn.TxnConflictException;
 import org.junit.After;
 import org.junit.Before;
@@ -61,7 +58,8 @@ public class DefaultTxnManagerTest
      */
     private String getLogFolder() throws IOException
     {
-        String file = folder.newFolder( LOG_SUFFIX ).getAbsolutePath();
+        File newFolder = folder.newFolder( LOG_SUFFIX );
+        String file = newFolder.getAbsolutePath();
 
         return file;
     }

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=1221261&r1=1221260&r2=1221261&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
Tue Dec 20 13:57:32 2011
@@ -22,7 +22,6 @@ package org.apache.directory.server.core
 
 import java.io.File;
 import java.io.IOException;
-import java.util.TreeSet;
 import java.util.UUID;
 
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -51,8 +50,6 @@ import org.apache.directory.server.core.
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import org.apache.directory.server.core.api.partition.index.MasterTable;
-import org.apache.directory.server.core.api.partition.index.AbstractTable;
 import org.apache.directory.server.core.api.txn.TxnLogManager;
 
 
@@ -112,14 +109,14 @@ public class EntryUpdateMergeTest
      */
     private String getLogFolder() throws IOException
     {
-        String file = folder.newFolder( LOG_SUFFIX ).getAbsolutePath();
+        File newFolder = folder.newFolder( LOG_SUFFIX );
+        String file = newFolder.getAbsolutePath();
 
         return file;
     }
 
 
     @Before
-    @SuppressWarnings("unchecked")
     public void setup() throws IOException, InvalidLogException
     {
         try
@@ -192,7 +189,6 @@ public class EntryUpdateMergeTest
         }
         catch ( Exception e )
         {
-            e.printStackTrace();
             fail();
         }
     }

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=1221261&r1=1221260&r2=1221261&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
Tue Dec 20 13:57:32 2011
@@ -36,7 +36,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.log.InvalidLogException;
 
 import org.apache.directory.shared.ldap.model.name.Dn;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 
 import org.junit.After;
 import org.junit.Before;
@@ -103,7 +102,8 @@ public class IndexCursorWrapperTest
      */
     private String getLogFolder() throws IOException
     {
-        String file = folder.newFolder( LOG_SUFFIX ).getAbsolutePath();
+        File newFolder = folder.newFolder( LOG_SUFFIX );
+        String file = newFolder.getAbsolutePath();
 
         return file;
     }

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=1221261&r1=1221260&r2=1221261&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
Tue Dec 20 13:57:32 2011
@@ -63,14 +63,14 @@ public class TxnConflicTest
      */
     private String getLogFolder() throws IOException
     {
-        String file = folder.newFolder( LOG_SUFFIX ).getAbsolutePath();
+        File newFolder = folder.newFolder( LOG_SUFFIX );
+        String file = newFolder.getAbsolutePath();
 
         return file;
     }
 
 
     @Before
-    @SuppressWarnings("unchecked")
     public void setup() throws IOException, InvalidLogException
     {
         try
@@ -82,7 +82,6 @@ public class TxnConflicTest
         }
         catch ( Exception e )
         {
-            e.printStackTrace();
             fail();
         }
     }

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=1221261&r1=1221260&r2=1221261&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
Tue Dec 20 13:57:32 2011
@@ -20,8 +20,6 @@
 package org.apache.directory.server.core.shared.txn;
 
 
-import java.io.File;
-import java.io.IOException;
 import java.util.TreeSet;
 import java.util.UUID;
 



Mime
View raw message