jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1326629 - in /jackrabbit/oak/trunk/oak-it/jcr: pom.xml src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java
Date Mon, 16 Apr 2012 14:25:57 GMT
Author: reschke
Date: Mon Apr 16 14:25:56 2012
New Revision: 1326629

URL: http://svn.apache.org/viewvc?rev=1326629&view=rev
Log:
create /testdata, enable a small subset of the TCK

Added:
    jackrabbit/oak/trunk/oak-it/jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java
Modified:
    jackrabbit/oak/trunk/oak-it/jcr/pom.xml
    jackrabbit/oak/trunk/oak-it/jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java

Modified: jackrabbit/oak/trunk/oak-it/jcr/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-it/jcr/pom.xml?rev=1326629&r1=1326628&r2=1326629&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-it/jcr/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-it/jcr/pom.xml Mon Apr 16 14:25:56 2012
@@ -44,7 +44,89 @@
             <property>
               <name>known.issues</name>
               <value>
-org.apache.jackrabbit.test.api
+org.apache.jackrabbit.test.api.RootNodeTest
+org.apache.jackrabbit.test.api.NodeReadMethodsTest
+org.apache.jackrabbit.test.api.NamespaceRegistryReadMethodsTest
+org.apache.jackrabbit.test.api.PropertyReadMethodsTest
+org.apache.jackrabbit.test.api.NodeDiscoveringNodeTypesTest
+org.apache.jackrabbit.test.api.NamespaceRemappingTest
+org.apache.jackrabbit.test.api.SessionReadMethodsTest
+org.apache.jackrabbit.test.api.WorkspaceReadMethodsTest
+org.apache.jackrabbit.test.api.ReferenceableRootNodesTest
+org.apache.jackrabbit.test.api.ExportSysViewTest
+org.apache.jackrabbit.test.api.ExportDocViewTest
+org.apache.jackrabbit.test.api.NameTest
+org.apache.jackrabbit.test.api.PathTest
+org.apache.jackrabbit.test.api.AddNodeTest
+org.apache.jackrabbit.test.api.NamespaceRegistryTest
+org.apache.jackrabbit.test.api.ReferencesTest
+org.apache.jackrabbit.test.api.SessionTest
+org.apache.jackrabbit.test.api.SessionUUIDTest
+org.apache.jackrabbit.test.api.NodeTest
+org.apache.jackrabbit.test.api.NodeUUIDTest
+org.apache.jackrabbit.test.api.NodeOrderableChildNodesTest
+org.apache.jackrabbit.test.api.PropertyTest
+org.apache.jackrabbit.test.api.SetValueBinaryTest
+org.apache.jackrabbit.test.api.SetValueBooleanTest
+org.apache.jackrabbit.test.api.SetValueDateTest
+org.apache.jackrabbit.test.api.SetValueDecimalTest
+org.apache.jackrabbit.test.api.SetValueDoubleTest
+org.apache.jackrabbit.test.api.SetValueLongTest
+org.apache.jackrabbit.test.api.SetValueReferenceTest
+org.apache.jackrabbit.test.api.SetValueStringTest
+org.apache.jackrabbit.test.api.SetValueConstraintViolationExceptionTest
+org.apache.jackrabbit.test.api.SetValueValueFormatExceptionTest
+org.apache.jackrabbit.test.api.SetValueFormatExceptionTest
+org.apache.jackrabbit.test.api.SetValueVersionExceptionTest
+org.apache.jackrabbit.test.api.SetPropertyBooleanTest
+org.apache.jackrabbit.test.api.SetPropertyCalendarTest
+org.apache.jackrabbit.test.api.SetPropertyDecimalTest
+org.apache.jackrabbit.test.api.SetPropertyDoubleTest
+org.apache.jackrabbit.test.api.SetPropertyInputStreamTest
+org.apache.jackrabbit.test.api.SetPropertyLongTest
+org.apache.jackrabbit.test.api.SetPropertyNodeTest
+org.apache.jackrabbit.test.api.SetPropertyNodeTest
+org.apache.jackrabbit.test.api.SetPropertyStringTest
+org.apache.jackrabbit.test.api.SetPropertyValueTest
+org.apache.jackrabbit.test.api.SetPropertyConstraintViolationExceptionTest
+org.apache.jackrabbit.test.api.SetPropertyAssumeTypeTest
+org.apache.jackrabbit.test.api.NodeItemIsModifiedTest
+org.apache.jackrabbit.test.api.NodeItemIsNewTest
+org.apache.jackrabbit.test.api.PropertyItemIsModifiedTest
+org.apache.jackrabbit.test.api.PropertyItemIsNewTest
+org.apache.jackrabbit.test.api.NodeAddMixinTest
+org.apache.jackrabbit.test.api.NodeCanAddMixinTest
+org.apache.jackrabbit.test.api.NodeRemoveMixinTest
+org.apache.jackrabbit.test.api.NodeSetPrimaryTypeTest
+org.apache.jackrabbit.test.api.WorkspaceCloneReferenceableTest
+org.apache.jackrabbit.test.api.WorkspaceCloneSameNameSibsTest
+org.apache.jackrabbit.test.api.WorkspaceCloneTest
+org.apache.jackrabbit.test.api.WorkspaceCloneVersionableTest
+org.apache.jackrabbit.test.api.WorkspaceCopyBetweenWorkspacesReferenceableTest
+org.apache.jackrabbit.test.api.WorkspaceCopyBetweenWorkspacesSameNameSibsTest
+org.apache.jackrabbit.test.api.WorkspaceCopyBetweenWorkspacesVersionableTest
+org.apache.jackrabbit.test.api.WorkspaceCopyBetweenWorkspacesTest
+org.apache.jackrabbit.test.api.WorkspaceCopyReferenceableTest
+org.apache.jackrabbit.test.api.WorkspaceCopySameNameSibsTest
+org.apache.jackrabbit.test.api.WorkspaceCopyTest
+org.apache.jackrabbit.test.api.WorkspaceCopyVersionableTest
+org.apache.jackrabbit.test.api.WorkspaceMoveReferenceableTest
+org.apache.jackrabbit.test.api.WorkspaceMoveSameNameSibsTest
+org.apache.jackrabbit.test.api.WorkspaceMoveTest
+org.apache.jackrabbit.test.api.WorkspaceMoveVersionableTest
+org.apache.jackrabbit.test.api.RepositoryLoginTest
+org.apache.jackrabbit.test.api.ImpersonateTest
+org.apache.jackrabbit.test.api.CheckPermissionTest
+org.apache.jackrabbit.test.api.DocumentViewImportTest
+org.apache.jackrabbit.test.api.SerializationTest
+org.apache.jackrabbit.test.api.ValueFactoryTest
+org.apache.jackrabbit.test.api.GetWeakReferencesTest
+org.apache.jackrabbit.test.api.SessionRemoveItemTest
+org.apache.jackrabbit.test.api.HasPermissionTest
+org.apache.jackrabbit.test.api.WorkspaceTest
+org.apache.jackrabbit.test.api.ShareableNodeTest
+org.apache.jackrabbit.test.api.RepositoryFactoryTest
+org.apache.jackrabbit.test.api.LifecycleTest
 org.apache.jackrabbit.test.api.query
 org.apache.jackrabbit.test.api.query.qom
 org.apache.jackrabbit.test.api.nodetype

Modified: jackrabbit/oak/trunk/oak-it/jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-it/jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java?rev=1326629&r1=1326628&r2=1326629&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-it/jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java
(original)
+++ jackrabbit/oak/trunk/oak-it/jcr/src/test/java/org/apache/jackrabbit/oak/jcr/OakRepositoryStub.java
Mon Apr 16 14:25:56 2012
@@ -32,17 +32,25 @@ public class OakRepositoryStub extends R
 
     /**
      * Constructor as required by the JCR TCK.
-     *
-     * @param settings repository settings
+     * 
+     * @param settings
+     *            repository settings
      */
     public OakRepositoryStub(Properties settings) throws RepositoryException {
         super(settings);
         repository = new RepositoryImpl();
+        Session session = repository.login(superuser);
+        try {
+            TestContentLoader loader = new TestContentLoader();
+            loader.loadTestContent(session);
+        } finally {
+            session.logout();
+        }
     }
 
     /**
      * Returns the configured repository instance.
-     *
+     * 
      * @return the configured repository instance.
      */
     @Override
@@ -67,5 +75,4 @@ public class OakRepositoryStub extends R
         return UNKNOWN_PRINCIPAL;
     }
 
-
 }

Added: jackrabbit/oak/trunk/oak-it/jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-it/jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java?rev=1326629&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-it/jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java
(added)
+++ jackrabbit/oak/trunk/oak-it/jcr/src/test/java/org/apache/jackrabbit/oak/jcr/TestContentLoader.java
Mon Apr 16 14:25:56 2012
@@ -0,0 +1,39 @@
+/*
+ * 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.jcr;
+
+import javax.jcr.Node;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+public class TestContentLoader {
+
+    public void loadTestContent(Session session) throws RepositoryException {
+
+        getOrAddNode(session.getRootNode(), "testdata");
+        session.save();
+    }
+
+    private Node getOrAddNode(Node node, String name) throws RepositoryException {
+        try {
+            return node.getNode(name);
+        } catch (PathNotFoundException e) {
+            return node.addNode(name);
+        }
+    }
+}



Mime
View raw message