mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
98073: Merged 5.0.N (5.0.2) to HEAD-BUG-FIX (5.1/Cloud) 97984: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.2) 97763: Merged DEV to V4.2-BUG-FIX 96388: MNT-13183 : Folder accessed through WebDAV is empty when a document is locked through CIFS access Detect "AlfrescoLockKeeperImpl" and then create new LockInfo object. 97572: MNT-13183 : Folder accessed through WebDAV is empty when a document is locked through CIFS access Added marker for webdav lock. Added new junit test. 97725: MNT-13183 : Folder accessed through WebDAV is empty when a document is locked through CIFS access Corrected some code. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@98102 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -2,6 +2,8 @@ package org.alfresco.repo.webdav;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Matchers.any;
|
||||
import static org.mockito.Matchers.anyBoolean;
|
||||
|
||||
@@ -203,4 +205,27 @@ public class WebDAVLockServiceImplTest
|
||||
lockInfo = davLockService.getLockInfo(nodeRef3);
|
||||
assertEquals(null, lockInfo);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mnt13183LockInfo()
|
||||
{
|
||||
// CIFS lock node to 1 hour
|
||||
lockService.lock(nodeRef1, LockType.WRITE_LOCK, 3600, Lifetime.EPHEMERAL, "lock_info_that_is_not_from_webdav");
|
||||
|
||||
// WebDAV get lock info
|
||||
LockInfo lockInfoNodeRef1 = davLockService.getLockInfo(nodeRef1);
|
||||
assertNull("exclusiveLockToken is null", lockInfoNodeRef1.getExclusiveLockToken());
|
||||
|
||||
String user = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||
|
||||
// WebDav lock, check marker
|
||||
davLockService.lock(nodeRef2, user, 3600);
|
||||
|
||||
LockState lockState2 = lockService.getLockState(nodeRef2);
|
||||
assertNotNull("lockState is not null", lockState2);
|
||||
|
||||
String additionalInfo2 = lockState2.getAdditionalInfo();
|
||||
assertNotNull("additionalInfo is not null", additionalInfo2);
|
||||
assertTrue("Check WEBDAV_LOCK marker", additionalInfo2.startsWith(LockInfoImpl.ADDINFO_WEBDAV_MARKER));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user