@@ -0,0 +1,2313 @@
+/*%0A * Licensed to the Apache Software Foundation (ASF) under one or more%0A * contributor license agreements.  See the NOTICE file distributed with%0A * this work for additional information regarding copyright ownership.%0A * The ASF licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.apache.jackrabbit.oak.plugins.document;%0A%0Aimport org.apache.jackrabbit.oak.plugins.document.util.Utils;%0Aimport org.apache.jackrabbit.oak.spi.state.NodeBuilder;%0Aimport org.junit.Before;%0Aimport org.junit.Ignore;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertNull;%0A%0A@Ignore%0Apublic class UpdateLimitTest %7B%0A%0A    @Rule%0A    public DocumentMKBuilderProvider builderProvider = new DocumentMKBuilderProvider();%0A%0A    private DocumentNodeStore ns;%0A    private DocumentStore store;%0A    private String testId;%0A%0A    @Before%0A    public void before() %7B%0A        ns = builderProvider.newBuilder().getNodeStore();%0A        store = ns.getDocumentStore();%0A        testId = Utils.getIdFromPath(%22/test%22);%0A    %7D%0A%0A    @Test%0A    public void rebase() throws Exception %7B%0A        NodeBuilder builder = someChanges(ns.getRoot().builder());%0A        for (int i = 0; i %3C 20; i++) %7B%0A            ns.rebase(builder);%0A            assertNull(store.find(Collection.NODES, testId));%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void reset() %7B%0A        NodeBuilder builder = someChanges(ns.getRoot().builder());%0A        for (int i = 0; i %3C 20; i++) %7B%0A            ns.reset(builder);%0A            someChanges(builder);%0A            assertNull(store.find(Collection.NODES, testId));%0A        %7D%0A    %7D%0A%0A    private NodeBuilder someChanges(NodeBuilder root) %7B%0A        NodeBuilder test = root.child(%22test%22);%0A        for (int i = 0; i %3C 23; i++) %7B%0A            test.child(%22node-%22 + i);%0A        %7D%0A        return root;%0A    %7D%0A%7D%0A

Update count increases with rebase