From ef0aad48fae1ac45edc5867f8445cb678a9de512 Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Sun, 9 Dec 2012 21:29:49 +0000 Subject: [PATCH] Merged BRANCHES/DEV/V4.1-BUG-FIX to HEAD 44176: Merge DEV to BRANCHES/DEV/V4.1-BUG-FIX - updated unit test to Alf-16540 fix git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@44522 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../java/org/alfresco/repo/lock/LockBehaviourImplTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/java/org/alfresco/repo/lock/LockBehaviourImplTest.java b/source/java/org/alfresco/repo/lock/LockBehaviourImplTest.java index 1f7cece860..046e5e3192 100644 --- a/source/java/org/alfresco/repo/lock/LockBehaviourImplTest.java +++ b/source/java/org/alfresco/repo/lock/LockBehaviourImplTest.java @@ -24,6 +24,7 @@ import java.util.Map; import org.alfresco.model.ContentModel; import org.alfresco.repo.security.authentication.AuthenticationComponent; +import org.alfresco.repo.security.permissions.AccessDeniedException; import org.alfresco.service.cmr.lock.LockService; import org.alfresco.service.cmr.lock.LockType; import org.alfresco.service.cmr.lock.NodeLockedException; @@ -257,10 +258,10 @@ public class LockBehaviourImplTest extends BaseSpringTest try { this.versionService.createVersion(this.nodeRef, new HashMap()); - fail("Should have failed since this node has been locked with a read only lock."); } catch (NodeLockedException exception) { + fail("Should have passed, as we should be able to create a version. See ALF-16540"); } this.lockService.unlock(this.nodeRef); } @@ -282,8 +283,9 @@ public class LockBehaviourImplTest extends BaseSpringTest this.versionService.createVersion(this.nodeRef, new HashMap()); fail("Should have failed since this node has been locked by another user with a write lock."); } - catch (NodeLockedException exception) + catch (AccessDeniedException exception) { + // Exception occurs when the properties are updated for a node } }