Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions jackrabbit-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testPathLiteral
org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testURILiteral <!-- OAK-3265 -->
org.apache.jackrabbit.core.version.ModifyNonVersionableCheckedOutTest#testNonVersionableCheckedOut <!-- JCR-5007 -->
org.apache.jackrabbit.core.version.ModifyNonVersionableCheckedOutTest#testModifyNonVersionableNodeWithCheckedOutProperty <!-- JCR-5007 -->
org.apache.jackrabbit.core.AddMoveTest#testTopLevelAddRemove <!-- JCR-5205 -->
org.apache.jackrabbit.core.config.SecurityConfigTest#testInvalidConfig <!-- JCR-5206 -->
org.apache.jackrabbit.core.nodetype.CyclicNodeTypeRegistrationTest <!-- JCR-5208 -->
org.apache.jackrabbit.core.query.lucene.SearchIndexConsistencyCheckTest#testDoubleCheckStressTest <!-- JCR-5209 -->
org.apache.jackrabbit.core.version.RemoveAndAddVersionLabelXATest#testVersionLabel <!-- JCR-5210 -->
</value>
</property>
<property>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public static Test suite() {

suite.addTestSuite(JackrabbitNodeTest.class);
suite.addTestSuite(JackrabbitObservationManagerTest.class);
suite.addTestSuite(JackrabbitSessionTest.class);

return suite;
}
Expand Down
22 changes: 20 additions & 2 deletions jackrabbit-core/src/test/java/org/apache/jackrabbit/core/AddMoveTest.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,30 @@ public void testTopLevelAddMove() throws Exception {
/**
* Add a top level node and remove it. Exposes a bug in the {@code CachingHierarchyManager},
* reported in JCR-3368.
* Also exposes a bug reported in JCR-5205.
*/
public void testTopLevelAddRemove() throws Exception {
Session session = getHelper().getReadWriteSession();
session.getRootNode().addNode("foo").addNode("bar");
Node rootNode = session.getRootNode();
Node foo = rootNode.addNode("foo");
//JCR-5205: note that the test doesn't fail if we add the following line
//foo = rootNode.getNode("foo");
foo.addNode("bar");
session.save();
session.getNode("/foo").remove();
session.getNode("/foo").remove(); //JCR-5205: note that the test doesn't fail if we replace this line with the following
//foo.remove();
assertFalse(session.getRootNode().hasNode("foo/bar"));
}

public void testSecondLevelAddRemove() throws Exception {
Session session = getHelper().getReadWriteSession();
Node rootNode = session.getRootNode();
Node parent = rootNode.addNode("parent");
Node foo = parent.addNode("foo");
foo.addNode("bar");
session.save();
session.getNode("/parent/foo").remove();
assertFalse(session.getRootNode().hasNode("parent/foo/bar"));
}

}
2 changes: 1 addition & 1 deletion jackrabbit-core/src/test/java/org/apache/jackrabbit/core/MoveTest.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void testMoveVisibilityAcrossSessions() throws RepositoryException {
Session session2 = getHelper().getReadWriteSession();

if (session1.itemExists("/foo")) {
session1.removeItem("/foo");
session1.getNode("/foo").remove();
session1.save();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ public static Test suite() {
suite.addTestSuite(RemoveAddNodeWithUUIDTest.class);
suite.addTestSuite(MoveAtRootTest.class);

suite.addTestSuite(RepositoryCopierTest.class);
suite.addTestSuite(ReadWhileSaveTest.class);
suite.addTestSuite(MoveRemoveTest.class);
suite.addTestSuite(LockedWrapperTest.class);
suite.addTestSuite(MoveTest.class);
suite.addTestSuite(MoveAtRootTest.class);
suite.addTestSuite(AddMoveTest.class);

return suite;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public static Test suite() {

suite.addTestSuite(ClusterRecordTest.class);
suite.addTestSuite(ClusterSyncTest.class);
suite.addTestSuite(ClusterDescriptorTest.class);
suite.addTestSuite(DbClusterTest.class);
suite.addTestSuite(DbClusterTestJCR3162.class);
suite.addTestSuite(FailUpdateOnJournalExceptionTest.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public static Test suite() {
suite.addTestSuite(RepositoryConfigTest.class);
suite.addTestSuite(WorkspaceConfigTest.class);
suite.addTestSuite(DataSourceConfigTest.class);
suite.addTestSuite(SecurityConfigTest.class);

return suite;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public static Test suite() {
suite.addTestSuite(TestTwoGetStreams.class);
suite.addTestSuite(WriteWhileReadingTest.class);
suite.addTestSuite(GCSubtreeMoveTest.class);
suite.addTestSuite(ConsistencyCheckerImplTest.class);

return suite;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import org.apache.jackrabbit.core.ConcurrencyTest;
import org.apache.jackrabbit.core.ConcurrentAddMoveRemoveTest;
import org.apache.jackrabbit.core.ConcurrentCheckinMixedTransactionTest;
import org.apache.jackrabbit.core.ConcurrentCyclicMoveTest;
import org.apache.jackrabbit.core.ConcurrentImportTest;
import org.apache.jackrabbit.core.ConcurrentLoginTest;
import org.apache.jackrabbit.core.ConcurrentNodeModificationTest;
import org.apache.jackrabbit.core.ConcurrentReadWriteTest;
Expand All @@ -30,6 +32,8 @@
import org.apache.jackrabbit.core.ConcurrentVersioningWithTransactionsTest;
import org.apache.jackrabbit.core.LockTest;
import org.apache.jackrabbit.core.ReadVersionsWhileModified;
import org.apache.jackrabbit.core.cache.ConcurrentCacheTest;
import org.apache.jackrabbit.core.cache.GrowingLRUMapTest;
import org.apache.jackrabbit.core.integration.ConcurrentQueriesWithUpdatesTest;
import org.apache.jackrabbit.core.query.lucene.LargeResultSetTest;
import org.apache.jackrabbit.core.lock.ConcurrentLockingTest;
Expand Down Expand Up @@ -62,6 +66,10 @@ public static Test suite() {
suite.addTestSuite(ConcurrentLockingWithTransactionsTest.class);
suite.addTestSuite(LargeResultSetTest.class);
suite.addTestSuite(ConcurrentQueriesWithUpdatesTest.class);
suite.addTestSuite(ConcurrentImportTest.class);
suite.addTestSuite(ConcurrentCyclicMoveTest.class);
suite.addTestSuite(ConcurrentCacheTest.class);
suite.addTestSuite(GrowingLRUMapTest.class);

return suite;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public static Test suite() {

suite.addTestSuite(NodeTypesInContentTest.class);
suite.addTestSuite(MixinTest.class);
suite.addTestSuite(CyclicNodeTypeRegistrationTest.class);

return suite;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ public static Test suite() {
suite.addTestSuite(SQL2OrderByTest.class);
suite.addTestSuite(DescendantSelfAxisTest.class);

suite.addTestSuite(TextExtractorTest.class);
suite.addTestSuite(SQL2TooManyClausesTest.class);
suite.addTestSuite(QueryExtensionsTest.class);
suite.addTestSuite(LazyResultSetQueryTest.class);

return suite;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
import javax.jcr.RepositoryException;

import org.apache.jackrabbit.core.query.lucene.SharedFieldCache.ComparableArray;
import org.apache.jackrabbit.test.JUnitTest;
import org.junit.Test;

public class ComparableArrayTest {
public class ComparableArrayTest extends JUnitTest {

/**
* Test for JCR-2906 to make sure the SharedFieldCache arranges the entries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ public static Test suite() {
suite.addTestSuite(IndexFormatVersionTest.class);
suite.addTestSuite(SynonymProviderTest.class);

suite.addTestSuite(UtilTest.class);
suite.addTestSuite(SearchIndexTest.class);
suite.addTestSuite(IDFieldTest.class);
suite.addTestSuite(ComparableArrayTest.class);
suite.addTestSuite(SearchIndexConsistencyCheckTest.class);

return suite;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public static Test suite() {
suite.addTestSuite(MoveTest.class);
suite.addTestSuite(RestrictionTest.class);

suite.addTestSuite(ReadNodeTypeTest.class);

return suite;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,14 @@ public static Test suite() {
suite.addTestSuite(UserImporterTest.class);

suite.addTestSuite(UserAccessControlProviderTest.class);
suite.addTestSuite(DefaultPrincipalProviderTest.class);
suite.addTestSuite(DefaultPrincipalProviderTest.class);

suite.addTestSuite(PasswordUtilityTest.class);

//TODO comsume time and memory
// suite.addTestSuite(MembershipCacheTest.class);
// suite.addTestSuite(MembershipCachePerfTest.class);

return suite;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public static Test suite() {
TestSuite suite = new TestSuite("Utility tests");
suite.addTestSuite(RepositoryLockTest.class);
suite.addTestSuite(CooperativeFileLockTest.class);
suite.addTestSuite(DOMWalkerTest.class);
return suite;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void testWorkspaceRemoveOrphanVersionHistory() throws RepositoryException
n.checkout();

Workspace defaultWorkspace = n.getSession().getWorkspace();
Session otherWsSession = n.getSession().getRepository().login(new SimpleCredentials("superuser", "".toCharArray()), workspaceName);
Session otherWsSession = getHelper().getSuperuserSession(workspaceName);
// Clone the node in another workspace
otherWsSession.getWorkspace().clone(defaultWorkspace.getName(), n.getPath(), n.getPath(), false);
Node otherWsRootNode = otherWsSession.getRootNode();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ public static Test suite() {
suite.addTestSuite(RestoreNodeWithSNSTest.class);
suite.addTestSuite(VersionIteratorImplTest.class);
suite.addTestSuite(ModifyNonVersionableCheckedOutTest.class);

suite.addTestSuite(RemoveVersionTest.class);
suite.addTestSuite(RemoveOrphanVersionHistoryTest.class);
suite.addTestSuite(RemoveAndAddVersionLabelXATest.class);

return suite;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public static Test suite() {
TestSuite suite = new TestSuite("XML format test cases");
suite.addTestSuite(DocumentViewTest.class);
suite.addTestSuite(AccessControlImporterTest.class);
suite.addTestSuite(WorkspaceImporterTest.class);
return suite;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import javax.jcr.ValueFactory;
import javax.jcr.nodetype.NoSuchNodeTypeException;
import javax.jcr.nodetype.NodeDefinition;
import javax.jcr.nodetype.ConstraintViolationException;
import javax.jcr.nodetype.NodeType;
import javax.jcr.nodetype.PropertyDefinition;
import javax.jcr.retention.RetentionManager;
Expand Down Expand Up @@ -897,7 +896,7 @@ protected Node cleanUpTestRoot(Session s) throws RepositoryException {
// try to remove child
try {
child.remove();
} catch (ConstraintViolationException e) {
} catch (RepositoryException e) {
log.println("unable to remove node: " + child.getPath());
}
}
Expand Down
2 changes: 1 addition & 1 deletion jackrabbit-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</scm>

<properties>
<test.opts.memory>-Xmx256m</test.opts.memory>
<test.opts.memory>-Xmx4g</test.opts.memory>
<test.opts.modules />
<test.opts>${test.opts.modules} ${test.opts.coverage} ${test.opts.memory} -enableassertions</test.opts>
<!-- OAK version used in components that *implement* oak-jackrabbit-api -->
Expand Down