jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1221652 - in /jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk: ConflictingMoveTest.java fs/FileSystemTest.java util/CommitGateTest.java
Date Wed, 21 Dec 2011 09:01:21 GMT
Author: thomasm
Date: Wed Dec 21 09:01:21 2011
New Revision: 1221652

URL: http://svn.apache.org/viewvc?rev=1221652&view=rev
Log:
Simplify tests.

Modified:
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConflictingMoveTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/fs/FileSystemTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/util/CommitGateTest.java

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConflictingMoveTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConflictingMoveTest.java?rev=1221652&r1=1221651&r2=1221652&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConflictingMoveTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConflictingMoveTest.java
Wed Dec 21 09:01:21 2011
@@ -68,11 +68,10 @@ public class ConflictingMoveTest extends
 
         try {
             mk.commit("/", ">\"b\" : \"a/b\"", head, "");
+            fail();
         } catch (MicroKernelException e) {
             // expected to fail since /a doesn't exist anymore
-            return;
         }
-        fail();
     }
 
     @Test
@@ -88,11 +87,10 @@ public class ConflictingMoveTest extends
 
         try {
             mk.commit("/", "-\"a\" \n +\"b/x\" : {}", head, "");
+            fail();
         } catch (MicroKernelException e) {
             // expected to fail since /b doesn't exist anymore
-            return;
         }
-        fail();
     }
 
 }

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/fs/FileSystemTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/fs/FileSystemTest.java?rev=1221652&r1=1221651&r2=1221652&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/fs/FileSystemTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/fs/FileSystemTest.java
Wed Dec 21 09:01:21 2011
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.mk.fs;
 
-import java.io.EOFException;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
@@ -28,8 +27,8 @@ import java.nio.channels.FileLock;
 import java.nio.channels.FileChannel.MapMode;
 import java.util.List;
 import java.util.Random;
-import org.apache.jackrabbit.mk.util.IOUtilsTest;
 import junit.framework.TestCase;
+import org.apache.jackrabbit.mk.util.IOUtilsTest;
 
 /**
  * Tests various file system.
@@ -334,11 +333,7 @@ public class FileSystemTest extends Test
                     byte[] b2 = new byte[len];
                     trace("readFully " + len);
                     ra.readFully(b1, 0, len);
-                    try {
-                        FileUtils.readFully(f, ByteBuffer.wrap(b2, 0, len));
-                    } catch (EOFException e) {
-                        e.printStackTrace();
-                    }
+                    FileUtils.readFully(f, ByteBuffer.wrap(b2, 0, len));
                     buff.append("readFully " + len + "\n");
                     IOUtilsTest.assertEquals(b1, b2);
                     break;

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/util/CommitGateTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/util/CommitGateTest.java?rev=1221652&r1=1221651&r2=1221652&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/util/CommitGateTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/util/CommitGateTest.java
Wed Dec 21 09:01:21 2011
@@ -51,7 +51,7 @@ public class CommitGateTest extends Test
                                 break;
                             }
                         } catch (InterruptedException e) {
-                            //
+                            // ignore
                         }
                     }
                 }



Mime
View raw message