Index: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/version/ReadOnlyVersionManagerNtTest.java =================================================================== --- oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/version/ReadOnlyVersionManagerNtTest.java (nonexistent) +++ oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/version/ReadOnlyVersionManagerNtTest.java (working copy) @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.jackrabbit.oak.plugins.version; + +import static com.google.common.base.Preconditions.checkNotNull; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; + +import java.util.Arrays; +import java.util.Collection; + +import org.apache.jackrabbit.oak.api.PropertyState; +import org.apache.jackrabbit.oak.api.Tree; +import org.apache.jackrabbit.oak.spi.version.VersionConstants; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +@RunWith(Parameterized.class) +public class ReadOnlyVersionManagerNtTest extends ReadOnlyVersionManagerTest { + + @Parameterized.Parameters + public static Collection oakReferenceableFrozenNode() { + return Arrays.asList("false", "true", null); + } + + private final String oakReferenceableFrozenNode; + + public ReadOnlyVersionManagerNtTest(String oakReferenceableFrozenNode) { + this.oakReferenceableFrozenNode = oakReferenceableFrozenNode; + if (oakReferenceableFrozenNode != null) { + System.setProperty("oak.referenceableFrozenNode", oakReferenceableFrozenNode); + } else { + System.clearProperty("oak.referenceableFrozenNode"); + } + } + + @Test + public void testNtFrozenNodeUuid() throws Exception { + Tree baseVersion = checkNotNull(versionManager.getBaseVersion(versionable)); + Tree frozen = baseVersion.getChild(VersionConstants.JCR_FROZENNODE); + PropertyState uuid = frozen.getProperty("jcr:uuid"); + if (oakReferenceableFrozenNode == null || + "false".equals(oakReferenceableFrozenNode)) { + assertNull(uuid); + } else { + assertNotNull(uuid); + } + } + +} Property changes on: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/version/ReadOnlyVersionManagerNtTest.java ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/version/ReadOnlyVersionManagerTest.java =================================================================== --- oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/version/ReadOnlyVersionManagerTest.java (revision 1880411) +++ oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/version/ReadOnlyVersionManagerTest.java (working copy) @@ -44,10 +44,10 @@ public class ReadOnlyVersionManagerTest extends AbstractSecurityTest { - private Tree versionable; + protected Tree versionable; private String workspaceName; - private ReadOnlyVersionManager versionManager; + protected ReadOnlyVersionManager versionManager; @Override @Before