jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r427960 - /jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/ImpersonateTest.java
Date Wed, 02 Aug 2006 12:15:44 GMT
Author: mreutegg
Date: Wed Aug  2 05:15:43 2006
New Revision: 427960

URL: http://svn.apache.org/viewvc?rev=427960&view=rev
Log:
JCR-498: TCK: ImpersonateTest#testImpersonate should allow LoginException

Modified:
    jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/ImpersonateTest.java

Modified: jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/ImpersonateTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/ImpersonateTest.java?rev=427960&r1=427959&r2=427960&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/ImpersonateTest.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/ImpersonateTest.java
Wed Aug  2 05:15:43 2006
@@ -17,11 +17,14 @@
 package org.apache.jackrabbit.test.api;
 
 import org.apache.jackrabbit.test.AbstractJCRTest;
+import org.apache.jackrabbit.test.NotExecutableException;
 
 import javax.jcr.Session;
 import javax.jcr.Credentials;
 import javax.jcr.NodeIterator;
 import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.LoginException;
 import java.security.AccessControlException;
 
 /**
@@ -38,9 +41,14 @@
     /**
      * Tests if <code>Session.impersonate(Credentials)</code> works properly
      */
-    public void testImpersonate() throws Exception {
+    public void testImpersonate() throws RepositoryException, NotExecutableException {
         // impersonate to read-only user
-        Session session = superuser.impersonate(helper.getReadOnlyCredentials());
+        Session session;
+        try {
+            session = superuser.impersonate(helper.getReadOnlyCredentials());
+        } catch (LoginException e) {
+            throw new NotExecutableException("impersonate threw LoginException");
+        }
 
         // get a path to test the permissions on
         String thePath = "";



Mime
View raw message