jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1407011 - /jackrabbit/oak/trunk/oak-mk/src/test/java/org/apache/jackrabbit/mk/blobs/AbstractBlobStoreTest.java
Date Thu, 08 Nov 2012 10:53:08 GMT
Author: mduerig
Date: Thu Nov  8 10:53:08 2012
New Revision: 1407011

URL: http://svn.apache.org/viewvc?rev=1407011&view=rev
Log:
OAK-430: Incorrect read logic in AbstractBlobStore

Modified:
    jackrabbit/oak/trunk/oak-mk/src/test/java/org/apache/jackrabbit/mk/blobs/AbstractBlobStoreTest.java

Modified: jackrabbit/oak/trunk/oak-mk/src/test/java/org/apache/jackrabbit/mk/blobs/AbstractBlobStoreTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mk/src/test/java/org/apache/jackrabbit/mk/blobs/AbstractBlobStoreTest.java?rev=1407011&r1=1407010&r2=1407011&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mk/src/test/java/org/apache/jackrabbit/mk/blobs/AbstractBlobStoreTest.java
(original)
+++ jackrabbit/oak/trunk/oak-mk/src/test/java/org/apache/jackrabbit/mk/blobs/AbstractBlobStoreTest.java
Thu Nov  8 10:53:08 2012
@@ -16,11 +16,6 @@
  */
 package org.apache.jackrabbit.mk.blobs;
 
-import junit.framework.TestCase;
-import org.apache.jackrabbit.mk.json.JsopBuilder;
-import org.apache.jackrabbit.mk.json.JsopTokenizer;
-import org.apache.jackrabbit.mk.util.IOUtilsTest;
-
 import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.FileInputStream;
@@ -34,6 +29,11 @@ import java.util.HashMap;
 import java.util.Random;
 import java.util.concurrent.atomic.AtomicBoolean;
 
+import junit.framework.TestCase;
+import org.apache.jackrabbit.mk.json.JsopBuilder;
+import org.apache.jackrabbit.mk.json.JsopTokenizer;
+import org.apache.jackrabbit.mk.util.IOUtilsTest;
+
 /**
  * Tests a BlobStore implementation.
  */
@@ -335,4 +335,28 @@ public abstract class AbstractBlobStoreT
         list.add(file.getAbsolutePath());
     }
 
+    // FIXME: OAK-430: Incorrect read logic in AbstractBlobStore
+//    public void testRead() throws Exception {
+//        int blobLength = 81;
+//        store.setBlockSize(80);
+//        store.setBlockSizeMin(48);
+//
+//        byte[] blob = createBlob(blobLength);
+//        String blobId = store.writeBlob(new ByteArrayInputStream(blob));
+//        assertNotNull(blobId);
+//
+//        byte[] readBlob = new byte[blobLength];
+//        store.readBlob(blobId, 0, readBlob, 0, readBlob.length);
+//        assertTrue(Arrays.equals(blob, readBlob));
+//    }
+
+    private static byte[] createBlob(int blobLength) {
+        byte[] blob = new byte[blobLength];
+        for (int i = 0; i < blob.length; i++) {
+            blob[i] = (byte)i;
+        }
+        return blob;
+    }
+
+
 }



Mime
View raw message