Search in sources :

Example 1 with BlobTracker

use of org.apache.jackrabbit.oak.plugins.blob.datastore.BlobTracker in project jackrabbit-oak by apache.

the class AbstractBlobTrackerRegistrationTest method reRegisterBlobTrackingStore.

@Test
public void reRegisterBlobTrackingStore() throws Exception {
    registerNodeStoreService();
    assertServiceNotActivated();
    registerTrackingBlobStore();
    assertServiceActivated();
    BlobStore blobStore = context.getService(BlobStore.class);
    assertTrue(blobStore instanceof BlobTrackingStore);
    BlobTrackingStore trackingStore = (BlobTrackingStore) blobStore;
    assertNotNull(trackingStore.getTracker());
    BlobTracker oldTracker = trackingStore.getTracker();
    unregisterNodeStoreService();
    registerNodeStoreService();
    blobStore = context.getService(BlobStore.class);
    trackingStore = (BlobTrackingStore) blobStore;
    BlobTracker newTracker = trackingStore.getTracker();
    assertNotEquals(oldTracker, newTracker);
    assertTrackerReinitialized();
}
Also used : BlobTracker(org.apache.jackrabbit.oak.plugins.blob.datastore.BlobTracker) BlobStore(org.apache.jackrabbit.oak.spi.blob.BlobStore) DataStoreBlobStore(org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore) Test(org.junit.Test)

Aggregations

BlobTracker (org.apache.jackrabbit.oak.plugins.blob.datastore.BlobTracker)1 DataStoreBlobStore (org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore)1 BlobStore (org.apache.jackrabbit.oak.spi.blob.BlobStore)1 Test (org.junit.Test)1