jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r430758 - /jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/AbstractJCRTest.java
Date Fri, 11 Aug 2006 11:22:28 GMT
Author: mreutegg
Date: Fri Aug 11 04:22:28 2006
New Revision: 430758

URL: http://svn.apache.org/viewvc?rev=430758&view=rev
Log:
JCR-540: AbstractJCRTest fails on level 1 repositories

Modified:
    jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/AbstractJCRTest.java

Modified: jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/AbstractJCRTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/AbstractJCRTest.java?rev=430758&r1=430757&r2=430758&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/AbstractJCRTest.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/AbstractJCRTest.java
Fri Aug 11 04:22:28 2006
@@ -342,11 +342,12 @@
                 // test root is the root node
                 testRootNode = superuser.getRootNode();
             } else if (!superuser.getRootNode().hasNode(testPath)) {
+                cleanUp();
                 fail("Workspace does not contain test data at: " + testRoot);
             } else {
                 testRootNode = superuser.getRootNode().getNode(testPath);
             }
-        } else {
+        } else if (isSupported(Repository.LEVEL_2_SUPPORTED)) {
             testRootNode = cleanUpTestRoot(superuser);
             // also clean second workspace
             Session s = helper.getSuperuserSession(workspaceName);
@@ -355,13 +356,16 @@
             } finally {
                 s.logout();
             }
+        } else {
+            cleanUp();
+            fail("Test case requires level 2 support.");
         }
     }
 
     protected void cleanUp() throws Exception {
         if (superuser != null) {
             try {
-                if (!isReadOnly) {
+                if (!isReadOnly && isSupported(Repository.LEVEL_2_SUPPORTED)) {
                     cleanUpTestRoot(superuser);
                 }
             } catch (Exception e) {



Mime
View raw message