Examples of waitUntil()


Examples of org.apache.jackrabbit.oak.stats.Clock.waitUntil()

        NodeDocument doc = docStore.find(NODES, Utils.getIdFromPath("/"));
        assertNotNull(doc);
        Revision created = doc.getLocalDeleted().firstKey();
        assertEquals(1, created.getClusterId());

        clock.waitUntil(System.currentTimeMillis() +
                DocumentNodeStore.REMEMBER_REVISION_ORDER_MILLIS / 2);

        NodeBuilder builder = nodeStore2.getRoot().builder();
        builder.setProperty("prop", "value");
        nodeStore2.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
View Full Code Here

Examples of org.apache.jackrabbit.oak.stats.Clock.waitUntil()

        NodeBuilder builder = nodeStore2.getRoot().builder();
        builder.setProperty("prop", "value");
        nodeStore2.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
        nodeStore2.runBackgroundOperations();

        clock.waitUntil(System.currentTimeMillis() +
                DocumentNodeStore.REMEMBER_REVISION_ORDER_MILLIS + 1000);
        nodeStore3.runBackgroundOperations();

        doc = docStore.find(NODES, Utils.getIdFromPath("/"));
        assertNotNull(doc);
View Full Code Here

Examples of org.apache.jackrabbit.oak.stats.Clock.waitUntil()

    }

    @Test
    public void modifiedReset() throws Exception {
        Clock clock = new Clock.Virtual();
        clock.waitUntil(System.currentTimeMillis());
        Revision.setClock(clock);
        MemoryDocumentStore docStore = new MemoryDocumentStore();
        DocumentNodeStore ns1 = new DocumentMK.Builder()
                .setDocumentStore(docStore).setClusterId(1)
                .setAsyncDelay(0).clock(clock).getNodeStore();
View Full Code Here

Examples of org.apache.jackrabbit.oak.stats.Clock.waitUntil()

        ns2.merge(builder2, EmptyHook.INSTANCE, CommitInfo.EMPTY);

        // wait at least _modified resolution. in reality the wait may
        // not be necessary. e.g. when the clock passes the resolution boundary
        // exactly at this time
        clock.waitUntil(System.currentTimeMillis() +
                SECONDS.toMillis(MODIFIED_IN_SECS_RESOLUTION + 1));

        builder1 = ns1.getRoot().builder();
        builder1.child("node").child("child-1");
        ns1.merge(builder1, EmptyHook.INSTANCE, CommitInfo.EMPTY);
View Full Code Here

Examples of org.apache.jackrabbit.oak.stats.Clock.waitUntil()

    // OAK-2232
    @Test
    public void diffExternalChanges() throws Exception {
        long modifiedResMillis = SECONDS.toMillis(MODIFIED_IN_SECS_RESOLUTION);
        Clock clock = new Clock.Virtual();
        clock.waitUntil(System.currentTimeMillis());
        Revision.setClock(clock);

        DocumentStore docStore = new MemoryDocumentStore();
        DocumentNodeStore ns1 = new DocumentMK.Builder().setAsyncDelay(0)
                .clock(clock).setDocumentStore(docStore).setClusterId(1)
View Full Code Here

Examples of org.apache.jackrabbit.oak.stats.Clock.waitUntil()

        ns1.runBackgroundOperations();
        ns2.runBackgroundOperations();

        // make sure next change has a different _modified value
        clock.waitUntil(clock.getTime() + modifiedResMillis * 2);

        builder = ns2.getRoot().builder();
        builder.child("test").child("foo");
        ns2.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);

View Full Code Here

Examples of org.apache.jackrabbit.oak.stats.Clock.waitUntil()

        builder = ns2.getRoot().builder();
        builder.child("test").child("foo");
        ns2.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);

        // 'wait' again for a different _modified value
        clock.waitUntil(clock.getTime() + modifiedResMillis * 2);

        builder = ns1.getRoot().builder();
        builder.child("test").child("bar");
        ns1.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);

View Full Code Here

Examples of org.apache.jackrabbit.oak.stats.Clock.waitUntil()

    // OAK-1814
    @Test
    public void visibilityAfterRevisionComparatorPurge() throws Exception {
        Clock clock = new Clock.Virtual();
        clock.waitUntil(System.currentTimeMillis());
        Revision.setClock(clock);
        MemoryDocumentStore docStore = new MemoryDocumentStore();
        DocumentNodeStore nodeStore1 = new DocumentMK.Builder()
                .setDocumentStore(docStore).setClusterId(1)
                .setAsyncDelay(0).clock(clock).getNodeStore();
View Full Code Here

Examples of org.apache.jackrabbit.oak.stats.Clock.waitUntil()

        NodeDocument doc = docStore.find(NODES, Utils.getIdFromPath("/"));
        assertNotNull(doc);
        Revision created = doc.getLocalDeleted().firstKey();
        assertEquals(1, created.getClusterId());

        clock.waitUntil(System.currentTimeMillis() +
                DocumentNodeStore.REMEMBER_REVISION_ORDER_MILLIS / 2);

        NodeBuilder builder = nodeStore2.getRoot().builder();
        builder.setProperty("prop", "value");
        nodeStore2.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
View Full Code Here

Examples of org.apache.jackrabbit.oak.stats.Clock.waitUntil()

        NodeBuilder builder = nodeStore2.getRoot().builder();
        builder.setProperty("prop", "value");
        nodeStore2.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
        nodeStore2.runBackgroundOperations();

        clock.waitUntil(System.currentTimeMillis() +
                DocumentNodeStore.REMEMBER_REVISION_ORDER_MILLIS + 1000);
        nodeStore3.runBackgroundOperations();

        doc = docStore.find(NODES, Utils.getIdFromPath("/"));
        assertNotNull(doc);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.