Return-Path: Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: (qmail 42279 invoked from network); 18 Apr 2008 08:40:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Apr 2008 08:40:59 -0000 Received: (qmail 70061 invoked by uid 500); 18 Apr 2008 08:41:00 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 70036 invoked by uid 500); 18 Apr 2008 08:41:00 -0000 Mailing-List: contact commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list commits@jackrabbit.apache.org Received: (qmail 70027 invoked by uid 99); 18 Apr 2008 08:41:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Apr 2008 01:41:00 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Apr 2008 08:40:05 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 699601A9832; Fri, 18 Apr 2008 01:40:21 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r649407 - in /jackrabbit/sandbox/spi/client/src/test: java/org/apache/jackrabbit/jcr2spi/ java/org/apache/jackrabbit/jcr2spi/lock/ java/org/apache/jackrabbit/jcr2spi/name/ java/org/apache/jackrabbit/jcr2spi/nodetype/ resources/ Date: Fri, 18 Apr 2008 08:39:58 -0000 To: commits@jackrabbit.apache.org From: angela@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080418084021.699601A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: angela Date: Fri Apr 18 01:39:51 2008 New Revision: 649407 URL: http://svn.apache.org/viewvc?rev=649407&view=rev Log: fix tests (jcr2spi -> spi-rmi -> spi2jcr) Added: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/LazyItemIteratorTest.java (with props) jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReplaceNodeTest.java (with props) Removed: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReplaceNode.java Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractMoveTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractMoveTreeTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/HierarchyNodeTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/MoveSNSTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/NodeOrderTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RefreshFalseTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RefreshMovedTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RefreshTrueTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RemoveItemTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RemoveNewNodeTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RemoveSNSTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RenameTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMixedTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMoveTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewAndSavedTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewSNSTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderReferenceableSNSTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderSNSTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RevertMoveTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/SNSIndexTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/TestAll.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/UpdateTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/lock/AbstractLockTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/lock/DeepLockTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/lock/OpenScopedLockTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/name/NamespaceRegistryTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/AddMixinTest.java jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/RemoveMixinTest.java jackrabbit/sandbox/spi/client/src/test/resources/jaas.config jackrabbit/sandbox/spi/client/src/test/resources/log4j.properties jackrabbit/sandbox/spi/client/src/test/resources/repository.xml Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractMoveTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractMoveTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractMoveTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractMoveTest.java Fri Apr 18 01:39:51 2008 @@ -51,8 +51,15 @@ destParentNode = testRootNode.addNode(nodeName3, testNodeType); // save the new nodes testRootNode.save(); - + destinationPath = destParentNode.getPath() + "/" + nodeName2; + } + + protected void tearDown() throws Exception { + srcParentNode = null; + destParentNode = null; + moveNode = null; + super.tearDown(); } protected abstract boolean isSessionMove(); Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractMoveTreeTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractMoveTreeTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractMoveTreeTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractMoveTreeTest.java Fri Apr 18 01:39:51 2008 @@ -62,6 +62,15 @@ doMove(moveNode.getPath(), destinationPath); } + protected void tearDown() throws Exception { + childNode = null; + grandChildNode = null; + childProperty = null; + srcParentNode = null; + destParentNode = null; + super.tearDown(); + } + protected abstract boolean saveBeforeMove(); protected abstract boolean isSessionMove(); Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java Fri Apr 18 01:39:51 2008 @@ -16,13 +16,17 @@ */ package org.apache.jackrabbit.jcr2spi; -import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.jackrabbit.jcr2spi.config.RepositoryConfig; +import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour; /** * AbstractRepositoryConfig... */ public abstract class AbstractRepositoryConfig implements RepositoryConfig { + + private static Logger log = LoggerFactory.getLogger(AbstractRepositoryConfig.class); public String getDefaultWorkspaceName() { return null; Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/HierarchyNodeTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/HierarchyNodeTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/HierarchyNodeTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/HierarchyNodeTest.java Fri Apr 18 01:39:51 2008 @@ -81,6 +81,11 @@ } } + protected void tearDown() throws Exception { + fileNode = null; + super.tearDown(); + } + public void testGetProperties() throws RepositoryException { Session readSession = helper.getReadOnlySession(); dump((Node) readSession.getItem(fileNode.getPath())); Added: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/LazyItemIteratorTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/LazyItemIteratorTest.java?rev=649407&view=auto ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/LazyItemIteratorTest.java (added) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/LazyItemIteratorTest.java Fri Apr 18 01:39:51 2008 @@ -0,0 +1,102 @@ +/* + * 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.jcr2spi; + +import org.apache.jackrabbit.test.AbstractJCRTest; +import org.apache.jackrabbit.test.NotExecutableException; + +import javax.jcr.Node; +import javax.jcr.RangeIterator; +import javax.jcr.RepositoryException; + +/** + * LazyItemIteratorTest contains implementation specific test + * cases, that check if the LazyItemIterator returns a better + * estimate for the number of Items to be available in the + * iteration than -1. + */ +public class LazyItemIteratorTest extends AbstractJCRTest { + + protected void setUp() throws Exception { + super.setUp(); + } + + public void testSizeGreaterMinusOne() throws RepositoryException { + RangeIterator it = testRootNode.getProperties(); + // a node always has at least a single property + assertTrue(it.getSize() > 0); + + if (testRootNode.hasNodes()) { + it = testRootNode.getNodes(); + // a node always has at least a single property + assertTrue(it.getSize() > 0); + } + } + + public void testSizeOfEmptyIteratorIsZero() throws RepositoryException { + int i = 0; + String nameHint = "noExisting"; + String name = nameHint; + while (testRootNode.hasProperty(name)) { + name = name + i; + i++; + } + // retrieve PropertyIterator for a name that does not exist as Property + RangeIterator it = testRootNode.getProperties(name); + assertTrue(it.getSize() == 0); + + name = nameHint; + while (testRootNode.hasNode(name)) { + name = name + i; + i++; + } + // retrieve NodeIterator for a name that does not exist as Node + it = testRootNode.getNodes(name); + assertTrue(it.getSize() == 0); + } + + public void testSizeShrinksIfInvalidItemFound() throws NotExecutableException, RepositoryException { + RangeIterator it; + try { + testRootNode.addNode(nodeName1, testNodeType); + testRootNode.addNode(nodeName2, testNodeType); + Node child = testRootNode.addNode(nodeName3, testNodeType); + testRootNode.save(); + + it = testRootNode.getNodes(); + // remove 1 child -> force the iterator to contain an entry that + // cannot be resolved into a node. + child.remove(); + + } catch (RepositoryException e) { + throw new NotExecutableException(); + } + + // now the original size is off by one and will be adjusted automatically + long size = it.getSize(); + long zise = 0; + while (it.hasNext()) { + it.next(); + zise++; + } + // original size is bigger by 1 than the calculated size during the + // iteration. + assertTrue(size == zise+1); + // retrieve size again and check if it has been been adjusted. + assertTrue(it.getSize() == zise); + } +} \ No newline at end of file Propchange: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/LazyItemIteratorTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/LazyItemIteratorTest.java ------------------------------------------------------------------------------ svn:keywords = author date id revision url Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/MoveSNSTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/MoveSNSTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/MoveSNSTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/MoveSNSTest.java Fri Apr 18 01:39:51 2008 @@ -56,6 +56,12 @@ testRootNode.save(); } + protected void tearDown() throws Exception { + sourceSibling = null; + destSibling = null; + super.tearDown(); + } + protected boolean isSessionMove() { return true; } Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/NodeOrderTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/NodeOrderTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/NodeOrderTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/NodeOrderTest.java Fri Apr 18 01:39:51 2008 @@ -48,6 +48,11 @@ testRootNode.save(); } + protected void tearDown() throws Exception { + children = null; + super.tearDown(); + } + private static void checkOrder(NodeIterator it, Node[] children) throws RepositoryException { int i = 0; while (it.hasNext()) { Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RefreshFalseTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RefreshFalseTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RefreshFalseTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RefreshFalseTest.java Fri Apr 18 01:39:51 2008 @@ -52,6 +52,11 @@ } } + protected void tearDown() throws Exception { + testValue = null; + super.tearDown(); + } + public void testNewProperty() throws RepositoryException, LockException, ConstraintViolationException, VersionException { Property p = testRootNode.setProperty(propertyName1, testValue); testRootNode.refresh(false); Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RefreshMovedTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RefreshMovedTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RefreshMovedTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RefreshMovedTest.java Fri Apr 18 01:39:51 2008 @@ -53,6 +53,7 @@ } protected void tearDown() throws Exception { + moveNode = null; super.tearDown(); } Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RefreshTrueTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RefreshTrueTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RefreshTrueTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RefreshTrueTest.java Fri Apr 18 01:39:51 2008 @@ -47,6 +47,11 @@ } } + protected void tearDown() throws Exception { + testValue = null; + super.tearDown(); + } + public void testNewProperty() throws RepositoryException { Property p = testRootNode.setProperty(propertyName1, testValue); testRootNode.refresh(true); Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RemoveItemTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RemoveItemTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RemoveItemTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RemoveItemTest.java Fri Apr 18 01:39:51 2008 @@ -48,6 +48,11 @@ removePath = removeItem.getPath(); } + protected void tearDown() throws Exception { + removeItem = null; + super.tearDown(); + } + protected abstract Item createRemoveItem() throws NotExecutableException, RepositoryException, LockException, ConstraintViolationException, ItemExistsException, NoSuchNodeTypeException, VersionException; /** Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RemoveNewNodeTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RemoveNewNodeTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RemoveNewNodeTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RemoveNewNodeTest.java Fri Apr 18 01:39:51 2008 @@ -44,6 +44,11 @@ removeNode = testRootNode.addNode(nodeName1, testNodeType); } + protected void tearDown() throws Exception { + removeNode = null; + super.tearDown(); + } + /** * Removes a transient node using {@link javax.jcr.Node#remove()}. */ Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RemoveSNSTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RemoveSNSTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RemoveSNSTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RemoveSNSTest.java Fri Apr 18 01:39:51 2008 @@ -37,6 +37,11 @@ private Node firstSiblingNode; private String firstSiblingPath; + protected void tearDown() throws Exception { + firstSiblingNode = null; + super.tearDown(); + } + protected Item createRemoveItem() throws NotExecutableException, RepositoryException { if (testRootNode.hasNode(nodeName1)) { fail("Setup: Parent node must not yet contain a child node '" + nodeName1 + "'."); Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RenameTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RenameTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RenameTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RenameTest.java Fri Apr 18 01:39:51 2008 @@ -55,5 +55,5 @@ superuser.refresh(false); assertEquals(moveNode.getName(), nodeName2); - } + } } Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMixedTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMixedTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMixedTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMixedTest.java Fri Apr 18 01:39:51 2008 @@ -1,3 +1,19 @@ +/* + * 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.jcr2spi; import org.slf4j.Logger; Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMoveTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMoveTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMoveTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMoveTest.java Fri Apr 18 01:39:51 2008 @@ -1,3 +1,19 @@ +/* + * 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.jcr2spi; import org.apache.jackrabbit.test.AbstractJCRTest; @@ -37,6 +53,12 @@ destPath = destParent.getPath() + "/" + nodeName3; testRootNode.save(); + } + + protected void tearDown() throws Exception { + destParent = null; + srcParent = null; + super.tearDown(); } private Node[] createOrderableChildren(boolean sns) throws RepositoryException { Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewAndSavedTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewAndSavedTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewAndSavedTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewAndSavedTest.java Fri Apr 18 01:39:51 2008 @@ -1,3 +1,19 @@ +/* + * 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.jcr2spi; import org.slf4j.Logger; Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewSNSTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewSNSTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewSNSTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewSNSTest.java Fri Apr 18 01:39:51 2008 @@ -1,3 +1,19 @@ +/* + * 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.jcr2spi; import org.slf4j.Logger; Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewTest.java Fri Apr 18 01:39:51 2008 @@ -1,3 +1,19 @@ +/* + * 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.jcr2spi; import org.slf4j.Logger; Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderReferenceableSNSTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderReferenceableSNSTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderReferenceableSNSTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderReferenceableSNSTest.java Fri Apr 18 01:39:51 2008 @@ -1,3 +1,19 @@ +/* + * 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.jcr2spi; import org.slf4j.Logger; Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderSNSTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderSNSTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderSNSTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderSNSTest.java Fri Apr 18 01:39:51 2008 @@ -1,3 +1,19 @@ +/* + * 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.jcr2spi; import org.slf4j.Logger; Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderTest.java Fri Apr 18 01:39:51 2008 @@ -1,3 +1,19 @@ +/* + * 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.jcr2spi; import org.slf4j.Logger; @@ -38,6 +54,14 @@ throw new NotExecutableException("Test node already contains child nodes"); } createOrderableChildren(); + } + + protected void tearDown() throws Exception { + child1 = null; + child2 = null; + child3 = null; + child4 = null; + super.tearDown(); } protected void createOrderableChildren() throws RepositoryException, LockException, ConstraintViolationException, NoSuchNodeTypeException, ItemExistsException, VersionException, NotExecutableException { Added: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReplaceNodeTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReplaceNodeTest.java?rev=649407&view=auto ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReplaceNodeTest.java (added) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReplaceNodeTest.java Fri Apr 18 01:39:51 2008 @@ -0,0 +1,98 @@ +/* + * 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.jcr2spi; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.apache.jackrabbit.test.AbstractJCRTest; +import org.apache.jackrabbit.test.NotExecutableException; + +import javax.jcr.RepositoryException; +import javax.jcr.Node; +import javax.jcr.UnsupportedRepositoryOperationException; + +/** + * ReplaceNodeTest + */ +public class ReplaceNodeTest extends AbstractJCRTest { + + private static Logger log = LoggerFactory.getLogger(ReplaceNodeTest.class); + + private Node removeNode; + private String uuid; + + protected void setUp() throws Exception { + super.setUp(); + + if (testRootNode.hasNode(nodeName1)) { + throw new NotExecutableException("Parent node must not yet contain a child node '" + nodeName1 + "'."); + } + removeNode = testRootNode.addNode(nodeName1, testNodeType); + // make sure the new node is persisted. + testRootNode.save(); + // assert removeNode is referenceable + if (!removeNode.isNodeType(mixReferenceable)) { + if (!removeNode.canAddMixin(mixReferenceable)) { + throw new NotExecutableException("Cannot make remove-node '" + nodeName1 + "' mix:referenceable."); + } + removeNode.addMixin(mixReferenceable); + testRootNode.save(); + } + uuid = removeNode.getUUID(); + } + + protected void tearDown() throws Exception { + removeNode = null; + super.tearDown(); + } + + public void testAddReplacementAfterRemove() throws RepositoryException { + // transient removal of the 'removeNode' + removeNode.remove(); + // add node that replaces the transiently removed node + Node n = testRootNode.addNode(nodeName2, testNodeType); + // ... and a child node. + n.addNode(nodeName3, testNodeType); + testRootNode.save(); + + try { + // if (for impl reasons) 'n' is referenceable -> it must have a + // different uuid. + assertFalse(uuid.equals(n.getUUID())); + } catch (UnsupportedRepositoryOperationException e) { + // n has not been made referenceable before -> OK. + } + } + + public void testAddReplacementAfterMove() throws RepositoryException { + // transiently move the 'removeNode' + superuser.move(removeNode.getPath(), testRootNode.getPath() + "/" + nodeName4); + // add node that replaces the moved node + Node n = testRootNode.addNode(nodeName1, testNodeType); + // ... and a child node. + n.addNode(nodeName2, testNodeType); + testRootNode.save(); + + try { + // if (for impl reasons) 'n' is referenceable -> it must have a + // different uuid. + assertFalse(uuid.equals(n.getUUID())); + } catch (UnsupportedRepositoryOperationException e) { + // n has not been made referenceable before -> OK. + } + } +} \ No newline at end of file Propchange: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReplaceNodeTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReplaceNodeTest.java ------------------------------------------------------------------------------ svn:keywords = author date id revision url Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RevertMoveTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RevertMoveTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RevertMoveTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/RevertMoveTest.java Fri Apr 18 01:39:51 2008 @@ -37,7 +37,7 @@ * Implementation specific test, that expects that the scope of a refresh(false) * must include all nodes affected by the operations that affected the * subtree to be refreshed. - * + * * @throws RepositoryException */ public void testRevertMovedNode() throws RepositoryException { Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/SNSIndexTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/SNSIndexTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/SNSIndexTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/SNSIndexTest.java Fri Apr 18 01:39:51 2008 @@ -63,6 +63,11 @@ } protected void tearDown() throws Exception { + parent = null; + sns1 = null; + sns2 = null; + sns3 = null; + sns4 = null; super.tearDown(); } Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/TestAll.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/TestAll.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/TestAll.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/TestAll.java Fri Apr 18 01:39:51 2008 @@ -16,11 +16,11 @@ */ package org.apache.jackrabbit.jcr2spi; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import junit.framework.Test; -import junit.framework.TestSuite; import junit.framework.TestCase; +import junit.framework.TestSuite; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * TestAll... @@ -49,7 +49,7 @@ suite.addTestSuite(MoveTreeTest.class); suite.addTestSuite(MoveNewTreeTest.class); suite.addTestSuite(MoveMultipleTest.class); - suite.addTestSuite(WorkspaceMoveTest.class); + //suite.addTestSuite(WorkspaceMoveTest.class); // see JCR-1276 suite.addTestSuite(RevertMoveTest.class); // refresh @@ -80,8 +80,9 @@ suite.addTestSuite(UpdateTest.class); // various - suite.addTestSuite(ReplaceNode.class); + suite.addTestSuite(ReplaceNodeTest.class); suite.addTestSuite(HierarchyNodeTest.class); + suite.addTestSuite(LazyItemIteratorTest.class); return suite; } Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/UpdateTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/UpdateTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/UpdateTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/UpdateTest.java Fri Apr 18 01:39:51 2008 @@ -74,7 +74,7 @@ String srcWorkspace = null; for (int i = 0; i < accessibleWorkspaces.length; i++) { - if (!accessibleWorkspaces.equals(currentWorkspace)) { + if (!accessibleWorkspaces[i].equals(currentWorkspace)) { try { n.getCorrespondingNodePath(accessibleWorkspaces[i]); } catch (ItemNotFoundException e) { @@ -207,7 +207,7 @@ private String getAnotherWorkspace() throws NotExecutableException { String srcWorkspace = null; for (int i = 0; i < accessibleWorkspaces.length; i++) { - if (!accessibleWorkspaces.equals(currentWorkspace)) { + if (!accessibleWorkspaces[i].equals(currentWorkspace)) { srcWorkspace = accessibleWorkspaces[i]; } } @@ -216,4 +216,4 @@ } return srcWorkspace; } -} \ No newline at end of file +} Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/lock/AbstractLockTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/lock/AbstractLockTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/lock/AbstractLockTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/lock/AbstractLockTest.java Fri Apr 18 01:39:51 2008 @@ -65,7 +65,11 @@ } if (otherSession.isLive()) { otherSession.logout(); + otherSession = null; } + lockedNode = null; + childNode = null; + lock = null; super.tearDown(); } @@ -312,7 +316,7 @@ /** * Test if the lock token has been automatically added to the set of lock * tokens present with the Session that created the new Lock. - * + * * @throws RepositoryException */ public void testLockTokenPresentWithSession() throws RepositoryException { Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/lock/DeepLockTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/lock/DeepLockTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/lock/DeepLockTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/lock/DeepLockTest.java Fri Apr 18 01:39:51 2008 @@ -57,6 +57,9 @@ } catch (RepositoryException e) { log.warn(e.getMessage()); } + lockedNode = null; + childNode = null; + lock = null; super.tearDown(); } Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/lock/OpenScopedLockTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/lock/OpenScopedLockTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/lock/OpenScopedLockTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/lock/OpenScopedLockTest.java Fri Apr 18 01:39:51 2008 @@ -30,7 +30,7 @@ public class OpenScopedLockTest extends AbstractLockTest { private static Logger log = LoggerFactory.getLogger(OpenScopedLockTest.class); - + boolean isSessionScoped() { return false; } @@ -169,7 +169,7 @@ assertFalse("Lock has been release by another session.", lockedNode.holdsLock()); assertFalse("Lock has been release by another session.", lock.isLive()); - assertFalse("Lock has been release by another session.", lock.getNode().isLocked()); + assertFalse("Lock has been release by another session.", lock.getNode().isLocked()); try { lockedNode.getLock(); fail("Lock has been release by another session."); Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/name/NamespaceRegistryTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/name/NamespaceRegistryTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/name/NamespaceRegistryTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/name/NamespaceRegistryTest.java Fri Apr 18 01:39:51 2008 @@ -60,6 +60,11 @@ } } + protected void tearDown() throws Exception { + nsRegistry = null; + super.tearDown(); + } + /** * Test if a new registred namespace is immediately visible through another * session object. Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/AddMixinTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/AddMixinTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/AddMixinTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/AddMixinTest.java Fri Apr 18 01:39:51 2008 @@ -45,6 +45,7 @@ protected void tearDown() throws Exception { testRootNode.refresh(false); + ntMgr = null; super.tearDown(); } Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/RemoveMixinTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/RemoveMixinTest.java?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/RemoveMixinTest.java (original) +++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/nodetype/RemoveMixinTest.java Fri Apr 18 01:39:51 2008 @@ -41,6 +41,11 @@ ntMgr = testRootNode.getSession().getWorkspace().getNodeTypeManager(); } + protected void tearDown() throws Exception { + ntMgr = null; + super.tearDown(); + } + /** * Implementation specific test for 'removeMixin' only taking effect upon * save. Modified: jackrabbit/sandbox/spi/client/src/test/resources/jaas.config URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/resources/jaas.config?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/resources/jaas.config (original) +++ jackrabbit/sandbox/spi/client/src/test/resources/jaas.config Fri Apr 18 01:39:51 2008 @@ -1,3 +1,3 @@ Jackrabbit { - org.apache.jackrabbit.core.security.SimpleLoginModule required anonymousId="anonymous"; + org.apache.jackrabbit.core.security.simple.SimpleLoginModule required anonymousId="anonymous" adminId="admin"; }; Modified: jackrabbit/sandbox/spi/client/src/test/resources/log4j.properties URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/resources/log4j.properties?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/resources/log4j.properties (original) +++ jackrabbit/sandbox/spi/client/src/test/resources/log4j.properties Fri Apr 18 01:39:51 2008 @@ -1,5 +1,24 @@ -# Set root logger level to DEBUG and its only appender to A1. -log4j.rootLogger=INFO, stdout +# 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. + +# Set root logger level to INFO and its only appender to file. +log4j.rootLogger=INFO, file +#log4j.rootLogger=DEBUG, stdout, file +#log4j.rootLogger=ERROR, stdout, file + +log4j.logger.org.apache.jackrabbit.test=DEBUG # 'stdout' is set to be a ConsoleAppender. log4j.appender.stdout=org.apache.log4j.ConsoleAppender @@ -7,3 +26,11 @@ # 'stdout' uses PatternLayout log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L)\n + +# 'file' is set to be a FileAppender. +log4j.appender.file=org.apache.log4j.FileAppender +log4j.appender.file.File=target/jcr.log + +# 'file' uses PatternLayout. +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L)\n Modified: jackrabbit/sandbox/spi/client/src/test/resources/repository.xml URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/resources/repository.xml?rev=649407&r1=649406&r2=649407&view=diff ============================================================================== --- jackrabbit/sandbox/spi/client/src/test/resources/repository.xml (original) +++ jackrabbit/sandbox/spi/client/src/test/resources/repository.xml Fri Apr 18 01:39:51 2008 @@ -15,8 +15,8 @@ See the License for the specific language governing permissions and limitations under the License. --> - + + + + + + - + - + + - + - - + -