Search in sources :

Example 1 with SegmentTarFixture

use of org.apache.jackrabbit.oak.segment.fixture.SegmentTarFixture in project jackrabbit-oak by apache.

the class ReferenceBinaryIT method fixtures.

@Parameterized.Parameters(name = "{0}")
public static Collection<Object[]> fixtures() throws Exception {
    File file = getTestDir("tar");
    FileStore fileStore = FileStoreBuilder.fileStoreBuilder(file).withBlobStore(createBlobStore()).withMaxFileSize(256).withMemoryMapping(true).build();
    SegmentNodeStore sns = SegmentNodeStoreBuilders.builder(fileStore).build();
    List<Object[]> fixtures = Lists.newArrayList();
    SegmentTarFixture segmentTarFixture = new SegmentTarFixture(sns);
    if (segmentTarFixture.isAvailable()) {
        fixtures.add(new Object[] { segmentTarFixture });
    }
    FileBlobStore fbs = new FileBlobStore(getTestDir("fbs1").getAbsolutePath());
    fbs.setReferenceKeyPlainText("foobar");
    FileStore fileStoreWithFBS = FileStoreBuilder.fileStoreBuilder(getTestDir("tar2")).withBlobStore(fbs).withMaxFileSize(256).withMemoryMapping(true).build();
    SegmentNodeStore snsWithFBS = SegmentNodeStoreBuilders.builder(fileStoreWithFBS).build();
    SegmentTarFixture segmentTarFixtureFBS = new SegmentTarFixture(snsWithFBS);
    if (segmentTarFixtureFBS.isAvailable()) {
        fixtures.add(new Object[] { segmentTarFixtureFBS });
    }
    DocumentMongoFixture documentFixture = new DocumentMongoFixture(MongoUtils.URL, createBlobStore());
    if (documentFixture.isAvailable()) {
        fixtures.add(new Object[] { documentFixture });
    }
    return fixtures;
}
Also used : FileStore(org.apache.jackrabbit.oak.segment.file.FileStore) DocumentMongoFixture(org.apache.jackrabbit.oak.fixture.DocumentMongoFixture) FileBlobStore(org.apache.jackrabbit.oak.spi.blob.FileBlobStore) SegmentTarFixture(org.apache.jackrabbit.oak.segment.fixture.SegmentTarFixture) SegmentNodeStore(org.apache.jackrabbit.oak.segment.SegmentNodeStore) File(java.io.File)

Example 2 with SegmentTarFixture

use of org.apache.jackrabbit.oak.segment.fixture.SegmentTarFixture in project jackrabbit-oak by apache.

the class LargeOperationIT method fixtures.

@Parameterized.Parameters
public static Collection<Object[]> fixtures() throws Exception {
    List<Object[]> fixtures = Lists.newArrayList();
    SegmentTarFixture segmentFixture = new SegmentTarFixture();
    if (segmentFixture.isAvailable()) {
        fixtures.add(new Object[] { segmentFixture, SEGMENT_SCALES });
    }
    DocumentMongoFixture documentFixture = new DocumentMongoFixture();
    if (documentFixture.isAvailable()) {
        fixtures.add(new Object[] { documentFixture, MONGO_SCALES });
    }
    return fixtures;
}
Also used : DocumentMongoFixture(org.apache.jackrabbit.oak.fixture.DocumentMongoFixture) SegmentTarFixture(org.apache.jackrabbit.oak.segment.fixture.SegmentTarFixture)

Aggregations

DocumentMongoFixture (org.apache.jackrabbit.oak.fixture.DocumentMongoFixture)2 SegmentTarFixture (org.apache.jackrabbit.oak.segment.fixture.SegmentTarFixture)2 File (java.io.File)1 SegmentNodeStore (org.apache.jackrabbit.oak.segment.SegmentNodeStore)1 FileStore (org.apache.jackrabbit.oak.segment.file.FileStore)1 FileBlobStore (org.apache.jackrabbit.oak.spi.blob.FileBlobStore)1