Package org.apache.jackrabbit.mongomk.query

Examples of org.apache.jackrabbit.mongomk.query.FetchValidCommitsQuery.execute()


    @Test
    public void simple() throws Exception {
        FetchValidCommitsQuery query = new FetchValidCommitsQuery(mongoConnection,
                String.valueOf(Integer.MAX_VALUE) /*maxRevisionId*/);
        List<CommitMongo> commits = query.execute();
        assertEquals(MIN_COMMITS, commits.size());

        SimpleNodeScenario scenario = new SimpleNodeScenario(mongoConnection);
        scenario.create();
        commits = query.execute();
View Full Code Here


        List<CommitMongo> commits = query.execute();
        assertEquals(MIN_COMMITS, commits.size());

        SimpleNodeScenario scenario = new SimpleNodeScenario(mongoConnection);
        scenario.create();
        commits = query.execute();
        assertEquals(SIMPLE_SCENARIO_COMMITS, commits.size());

        int numberOfChildren = 3;
        scenario.addChildrenToA(numberOfChildren);
        commits = query.execute();
View Full Code Here

        commits = query.execute();
        assertEquals(SIMPLE_SCENARIO_COMMITS, commits.size());

        int numberOfChildren = 3;
        scenario.addChildrenToA(numberOfChildren);
        commits = query.execute();
        assertEquals(SIMPLE_SCENARIO_COMMITS + numberOfChildren, commits.size());
    }

    @Test
    public void revisionId() throws Exception {
View Full Code Here

    @Test
    public void revisionId() throws Exception {
        FetchValidCommitsQuery query = new FetchValidCommitsQuery(mongoConnection,
                String.valueOf(Integer.MAX_VALUE) /*maxRevisionId*/);
        List<CommitMongo> commits = query.execute();
        CommitMongo commit0 = commits.get(0);

        SimpleNodeScenario scenario = new SimpleNodeScenario(mongoConnection);
        scenario.create();
        commits = query.execute();
View Full Code Here

        List<CommitMongo> commits = query.execute();
        CommitMongo commit0 = commits.get(0);

        SimpleNodeScenario scenario = new SimpleNodeScenario(mongoConnection);
        scenario.create();
        commits = query.execute();
        CommitMongo commit1 = commits.get(0);
        assertTrue(commit0.getRevisionId() < commit1.getRevisionId());

        int numberOfChildren = 3;
        scenario.addChildrenToA(numberOfChildren);
View Full Code Here

        CommitMongo commit1 = commits.get(0);
        assertTrue(commit0.getRevisionId() < commit1.getRevisionId());

        int numberOfChildren = 3;
        scenario.addChildrenToA(numberOfChildren);
        commits = query.execute();
        CommitMongo commit2 = commits.get(0);
        assertTrue(commit1.getRevisionId() < commit2.getRevisionId());
    }

    @Test
View Full Code Here

    @Test
    public void time() throws Exception {
        FetchValidCommitsQuery query = new FetchValidCommitsQuery(mongoConnection,
                String.valueOf(Integer.MAX_VALUE) /*maxRevisionId*/);
        List<CommitMongo> commits = query.execute();
        CommitMongo commit0 = commits.get(0);

        Thread.sleep(1000);

        SimpleNodeScenario scenario = new SimpleNodeScenario(mongoConnection);
View Full Code Here

        Thread.sleep(1000);

        SimpleNodeScenario scenario = new SimpleNodeScenario(mongoConnection);
        scenario.create();
        commits = query.execute();
        CommitMongo commit1 = commits.get(0);
        assertTrue(commit0.getTimestamp() < commit1.getTimestamp());

        Thread.sleep(1000);
View Full Code Here

        Thread.sleep(1000);

        int numberOfChildren = 3;
        scenario.addChildrenToA(numberOfChildren);
        commits = query.execute();
        CommitMongo commit2 = commits.get(0);
        assertTrue(commit1.getTimestamp() < commit2.getTimestamp());
    }

    @Test
View Full Code Here

        int numberOfChildren = 2;
        scenario.addChildrenToA(numberOfChildren);

        int maxEntries = 0;
        FetchValidCommitsQuery query = new FetchValidCommitsQuery(mongoConnection, maxEntries);
        List<CommitMongo> commits = query.execute();
        assertEquals(SIMPLE_SCENARIO_COMMITS + numberOfChildren, commits.size());
    }

    @Test
    public void maxEntries() throws Exception {
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.