jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1420675 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserManagerTest.java
Date Wed, 12 Dec 2012 13:55:46 GMT
Author: angela
Date: Wed Dec 12 13:55:45 2012
New Revision: 1420675

URL: http://svn.apache.org/viewvc?rev=1420675&view=rev
Log:
OAK-50 : Implement User Management (fix test-case: thanks manfred for spotting!)

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserManagerTest.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserManagerTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserManagerTest.java?rev=1420675&r1=1420674&r2=1420675&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserManagerTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/user/UserManagerTest.java
Wed Dec 12 13:55:45 2012
@@ -594,14 +594,17 @@ public class UserManagerTest extends Abs
                 superuser.save();
 
                 fail("intermediate path '"+ path +"' outside of the user tree.");
-                user.remove();
-                superuser.save();
-
             } catch (Exception e) {
                 // success
-                assertNull(userMgr.getAuthorizable(uid));
             } finally {
+                // revert transient changes
                 superuser.refresh(false);
+                // clean up
+                Authorizable testUser = userMgr.getAuthorizable(uid);
+                if (testUser != null) {
+                    testUser.remove();
+                    superuser.save();
+                }
             }
         }
     }



Mime
View raw message