Package org.apache.jackrabbit.mk.core

Examples of org.apache.jackrabbit.mk.core.MicroKernelImpl.commit()


    @Before
    public void setUp() throws Exception {
        MicroKernel microKernel = new MicroKernelImpl();
        String jsop = "^\"a\":1 ^\"b\":2 ^\"c\":3 +\"x\":{} +\"y\":{} +\"z\":{} " +
                "+\"oak:index\":{\"solrIdx\":{\"coreName\":\"cn\", \"solrHomePath\":\"sh\", \"solrConfigPath\":\"sc\"}} ";
        microKernel.commit("/", jsop, microKernel.getHeadRevision(), "test data");
        store = new KernelNodeStore(microKernel);
    }

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


    @Before
    public void setUp() throws Exception {
        MicroKernel microKernel = new MicroKernelImpl();
        String jsop = "^\"a\":1 ^\"b\":2 ^\"c\":3 +\"x\":{} +\"y\":{} +\"z\":{} " +
                "+\"oak:index\":{\"solrIdx\":{\"coreName\":\"cn\", \"solrHomePath\":\"sh\", \"solrConfigPath\":\"sc\"}} ";
        microKernel.commit("/", jsop, microKernel.getHeadRevision(), "test data");
        store = new KernelNodeStore(microKernel);
    }

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

    @Before
    public void setUp() throws Exception {
        MicroKernel microKernel = new MicroKernelImpl();
        String jsop = "^\"a\":1 ^\"b\":2 ^\"c\":3 +\"x\":{} +\"y\":{} +\"z\":{} " +
                "+\"oak:index\":{\"solrIdx\":{\"coreName\":\"cn\", \"solrHomePath\":\"sh\", \"solrConfigPath\":\"sc\"}} ";
        microKernel.commit("/", jsop, microKernel.getHeadRevision(), "test data");
        store = new KernelNodeStore(microKernel);
    }

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

    @Test
    @Ignore("OAK-532"// FIXME OAK-532
    public void journalConsistency() throws Exception {
        while (true) {
            final MicroKernel mk1 = new MicroKernelImpl();
            final String rev = mk1.commit("", "+\"/a\":{}", null, null);

            Thread t1 = new Thread("t1") {
                @Override
                public void run() {
                    try {
View Full Code Here

            Thread t1 = new Thread("t1") {
                @Override
                public void run() {
                    try {
                        String r2 = mk1.commit("", "-\"/a\"+\"/c\":{}", rev, null);
                    }
                    catch (MicroKernelException ignore) { }
                }
            };
            Thread t2 = new Thread("t2") {
View Full Code Here

            };
            Thread t2 = new Thread("t2") {
                @Override
                public void run() {
                    try {
                        String r2 = mk1.commit("", "-\"/a\"+\"/b\":{}", rev, null);
                    }
                    catch (MicroKernelException ignore) { }
                }
            };
View Full Code Here

    @Before
    public void setUp() throws Exception {
        MicroKernel microKernel = new MicroKernelImpl();
        String jsop = "^\"a\":1 ^\"b\":2 ^\"c\":3 +\"x\":{} +\"y\":{} +\"z\":{} " +
                "+\"oak:index\":{\"solrIdx\":{\"coreName\":\"cn\", \"solrHome\":\"sh\", \"solrConfig\":\"sc\"}} ";
        microKernel.commit("/", jsop, microKernel.getHeadRevision(), "test data");
        store = new KernelNodeStore(microKernel);
    }

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

        String oldHead = head;

        Assert.assertEquals(null, index.getPath("1", head));

        head = mk.commit("/", "+\"test\" : {\"id\":\"1\"}", head, null);
        head = mk.commit("/", "+\"test2\" : {\"id\":\"2\"}", head, null);

        Assert.assertEquals("/test", index.getPath("1", head));
        Assert.assertEquals("/test2", index.getPath("2", head));
View Full Code Here

        String oldHead = head;

        Assert.assertEquals(null, index.getPath("1", head));

        head = mk.commit("/", "+\"test\" : {\"id\":\"1\"}", head, null);
        head = mk.commit("/", "+\"test2\" : {\"id\":\"2\"}", head, null);

        Assert.assertEquals("/test", index.getPath("1", head));
        Assert.assertEquals("/test2", index.getPath("2", head));

        Assert.assertEquals("/test", index.getPath("1", oldHead));
View Full Code Here

        Assert.assertEquals("/test2", index.getPath("2", oldHead));

        Assert.assertEquals("/test", index.getPath("1", head));
        Assert.assertEquals("/test2", index.getPath("2", head));

        head = mk.commit("/", "-\"test2\"", head, null);
        head = mk.commit("/test", "+\"test\" : {\"id\":\"3\"}", head, null);

        Assert.assertEquals("/test/test", index.getPath("3", head));

        // Recreate the indexer
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.