jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r571395 - /jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/AbstractObservationTest.java
Date Fri, 31 Aug 2007 08:10:24 GMT
Author: reschke
Date: Fri Aug 31 01:10:22 2007
New Revision: 571395

URL: http://svn.apache.org/viewvc?rev=571395&view=rev
Log:
JCR-1101: throw NotExecutableException when repository does not support observation.

Modified:
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/AbstractObservationTest.java

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/AbstractObservationTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/AbstractObservationTest.java?rev=571395&r1=571394&r2=571395&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/AbstractObservationTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/AbstractObservationTest.java
Fri Aug 31 01:10:22 2007
@@ -17,8 +17,10 @@
 package org.apache.jackrabbit.test.api.observation;
 
 import org.apache.jackrabbit.test.AbstractJCRTest;
+import org.apache.jackrabbit.test.NotExecutableException;
 
 import javax.jcr.RepositoryException;
+import javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.observation.Event;
 import javax.jcr.observation.EventListener;
 import javax.jcr.observation.ObservationManager;
@@ -46,7 +48,12 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        obsMgr = superuser.getWorkspace().getObservationManager();
+        try {
+            obsMgr = superuser.getWorkspace().getObservationManager();
+        }
+        catch (UnsupportedRepositoryOperationException ex) {
+            throw new NotExecutableException("observation not supported");
+        }
     }
 
     /**



Mime
View raw message