You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by ju...@apache.org on 2007/09/20 20:19:46 UTC
svn commit: r577851 - in
/jackrabbit/branches/1.3/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api:
WorkspaceCopyVersionableTest.java WorkspaceMoveVersionableTest.java
Author: jukka
Date: Thu Sep 20 11:19:45 2007
New Revision: 577851
URL: http://svn.apache.org/viewvc?rev=577851&view=rev
Log:
1.3: Merged revision 567054 (JCR-1065)
Modified:
jackrabbit/branches/1.3/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/WorkspaceCopyVersionableTest.java
jackrabbit/branches/1.3/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/WorkspaceMoveVersionableTest.java
Modified: jackrabbit/branches/1.3/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/WorkspaceCopyVersionableTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.3/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/WorkspaceCopyVersionableTest.java?rev=577851&r1=577850&r2=577851&view=diff
==============================================================================
--- jackrabbit/branches/1.3/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/WorkspaceCopyVersionableTest.java (original)
+++ jackrabbit/branches/1.3/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/WorkspaceCopyVersionableTest.java Thu Sep 20 11:19:45 2007
@@ -19,6 +19,7 @@
import org.apache.jackrabbit.test.NotExecutableException;
import javax.jcr.RepositoryException;
+import javax.jcr.nodetype.ConstraintViolationException;
import javax.jcr.version.VersionException;
@@ -46,16 +47,21 @@
* versionable and checked-in, or is non-versionable but its nearest
* versionable ancestor is checked-in.
*/
- public void testCopyNodesVersionableAndCheckedIn() throws RepositoryException {
+ public void testCopyNodesVersionableAndCheckedIn() throws RepositoryException, NotExecutableException {
// prepare the test data
// create a non-versionable node below a versionable node
// required for having a nearest versionable ancestor to a nonversionable sub node
String dstAbsPath = node1.getPath() + "/" + node2.getName();
workspace.copy(node2.getPath(), dstAbsPath);
- // make parent node versionable and check-in
- addMixinVersionableToNode(testRootNode, node1);
- node1.checkin();
+ try {
+ // make parent node versionable and check-in
+ addMixinVersionableToNode(testRootNode, node1);
+ node1.checkin();
+ }
+ catch (ConstraintViolationException ex) {
+ throw new NotExecutableException("server does not support making the parent versionable: " + ex.getMessage());
+ }
// 1. parent node of destAbsPath is non-versionable but its nearest versionable ancestor is checked-in
try {
Modified: jackrabbit/branches/1.3/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/WorkspaceMoveVersionableTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.3/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/WorkspaceMoveVersionableTest.java?rev=577851&r1=577850&r2=577851&view=diff
==============================================================================
--- jackrabbit/branches/1.3/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/WorkspaceMoveVersionableTest.java (original)
+++ jackrabbit/branches/1.3/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/WorkspaceMoveVersionableTest.java Thu Sep 20 11:19:45 2007
@@ -19,6 +19,7 @@
import org.apache.jackrabbit.test.NotExecutableException;
import javax.jcr.RepositoryException;
+import javax.jcr.nodetype.ConstraintViolationException;
import javax.jcr.version.VersionException;
@@ -46,16 +47,21 @@
* versionable and checked-in, or is non-versionable but its nearest
* versionable ancestor is checked-in.
*/
- public void testMoveNodesVersionableAndCheckedIn() throws RepositoryException {
+ public void testMoveNodesVersionableAndCheckedIn() throws RepositoryException, NotExecutableException {
// prepare the test data
// create a non-versionable node below a versionable node
// required for having a nearest versionable ancestor to a nonversionable sub node
String dstAbsPath = node1.getPath() + "/" + node2.getName();
workspace.copy(node2.getPath(), dstAbsPath);
- // make parent node versionable and check-in
- addMixinVersionableToNode(testRootNode, node1);
- node1.checkin();
+ try {
+ // make parent node versionable and check-in
+ addMixinVersionableToNode(testRootNode, node1);
+ node1.checkin();
+ }
+ catch (ConstraintViolationException ex) {
+ throw new NotExecutableException("server does not support making the parent versionable: " + ex.getMessage());
+ }
// 1. parent node of destAbsPath is non-versionable but its nearest versionable ancestor is checked-in
try {