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:
Kevin Roast
2012-12-09 21:29:49 +00:00
parent 34cc24aad6
commit ef0aad48fa

View File

@@ -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
}
}