You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2017/05/03 14:09:59 UTC
svn commit: r1793648 - in /jackrabbit/oak/branches/1.6: ./
oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BlobReferenceIteratorTest.java
Author: reschke
Date: Wed May 3 14:09:59 2017
New Revision: 1793648
URL: http://svn.apache.org/viewvc?rev=1793648&view=rev
Log:
OAK-6159: BlobReferenceIterator: improve test coverage for RDB (ported to 1.6)
Modified:
jackrabbit/oak/branches/1.6/ (props changed)
jackrabbit/oak/branches/1.6/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BlobReferenceIteratorTest.java
Propchange: jackrabbit/oak/branches/1.6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed May 3 14:09:59 2017
@@ -1,3 +1,3 @@
/jackrabbit/oak/branches/1.0:1665962
-/jackrabbit/oak/trunk:1781068,1781075,1781248,1781386,1781846,1781907,1782000,1782029,1782196,1782447,1782476,1782770,1782945,1782966,1782973,1782990,1783061,1783066,1783089,1783104-1783105,1783619,1783720,1783731,1783733,1783738,1783742,1783773,1783855,1783891,1784023,1784130,1784162,1784251,1784401,1784551,1784574,1785095,1785108,1785283,1785838,1785919,1785946,1787074,1787217,1788378,1788387-1788389,1790382,1792463,1792742,1793088,1793618,1793627
+/jackrabbit/oak/trunk:1781068,1781075,1781248,1781386,1781846,1781907,1782000,1782029,1782196,1782447,1782476,1782770,1782945,1782966,1782973,1782990,1783061,1783066,1783089,1783104-1783105,1783619,1783720,1783731,1783733,1783738,1783742,1783773,1783855,1783891,1784023,1784130,1784162,1784251,1784401,1784551,1784574,1785095,1785108,1785283,1785838,1785919,1785946,1787074,1787217,1788378,1788387-1788389,1790382,1792463,1792742,1793088,1793618,1793627,1793644
/jackrabbit/trunk:1345480
Modified: jackrabbit/oak/branches/1.6/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BlobReferenceIteratorTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.6/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BlobReferenceIteratorTest.java?rev=1793648&r1=1793647&r2=1793648&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.6/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BlobReferenceIteratorTest.java (original)
+++ jackrabbit/oak/branches/1.6/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BlobReferenceIteratorTest.java Wed May 3 14:09:59 2017
@@ -49,14 +49,19 @@ public class BlobReferenceIteratorTest {
this.fixture = fixture;
}
- @Parameterized.Parameters
+ @Parameterized.Parameters(name="{0}")
public static java.util.Collection<Object[]> fixtures() throws IOException {
List<Object[]> fixtures = Lists.newArrayList();
- fixtures.add(new Object[]{new DocumentStoreFixture.MemoryFixture()});
+ fixtures.add(new Object[] { new DocumentStoreFixture.MemoryFixture() });
DocumentStoreFixture mongo = new DocumentStoreFixture.MongoFixture();
if (mongo.isAvailable()) {
- fixtures.add(new Object[]{mongo});
+ fixtures.add(new Object[] { mongo });
+ }
+
+ DocumentStoreFixture rdb = new DocumentStoreFixture.RDBFixture();
+ if (rdb.isAvailable()) {
+ fixtures.add(new Object[] { rdb });
}
return fixtures;
}
@@ -67,23 +72,22 @@ public class BlobReferenceIteratorTest {
.setDocumentStore(fixture.createDocumentStore())
.setAsyncDelay(0)
.getNodeStore();
-
}
@After
public void tearDown() throws Exception {
store.dispose();
}
-
+
@Test
- public void testBlobIterator() throws Exception{
+ public void testBlobIterator() throws Exception {
List<ReferencedBlob> blobs = Lists.newArrayList();
- //1. Set some single value Binary property
- for(int i = 0; i < 10; i++){
+ // 1. Set some single value Binary property
+ for (int i = 0; i < 10; i++) {
NodeBuilder b1 = store.getRoot().builder();
Blob b = store.createBlob(randomStream(i, 4096));
- b1.child("x").child("y"+1).setProperty("b" + i, b);
+ b1.child("x").child("y" + 1).setProperty("b" + i, b);
blobs.add(new ReferencedBlob(b, "/x/y" + 1));
store.merge(b1, EmptyHook.INSTANCE, CommitInfo.EMPTY);
}