mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
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
This commit is contained in:
@@ -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<String, Serializable>());
|
||||
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<String, Serializable>());
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user