mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
60596: Merged V4.2-BUG-FIX (4.2.2) to HEAD-BUG-FIX (Cloud/4.3) 60363: Merged DEV to V4.2-BUG-FIX (4.2.2) 58124: Added missing transaction(s) in SOLRTrackingComponentTest (MNT-9806) 58128: Added missing transaction(s) in MultiTDemoTest (MNT-9806) 58247: Added missing transaction(s) in TransferServiceToBeRefactoredTest. Fixed dozens of warnings as well. (MNT-9806) 58248: Added missing transaction(s) in WikiServiceImplTest. Fixed code warnings. (MNT-9806) 58249: Added missing transaction(s) in CalendarServiceImplTest. (MNT-9806) 58251: Added missing transaction(s) in NodeServiceTest. (MNT-9806) 58252: Added missing transaction(s) in LockDAOTest. (MNT-9806) 58253: Added missing transaction(s) in NodeDAOTest. (MNT-9806) 58257: Added missing transaction(s) in SOLRDAOTest. (MNT-9806) 58259: Added missing transaction(s) in ReplicationRestApiTest (MNT-9806) 58260: Added missing transaction(s) in RunningActionRestApiTest (MNT-9806) 58304: Added missing transaction(s) in UnlockMethodTest (MNT-9806) 58368: Added missing transaction(s) in UnlockMethodTest (MNT-9806) 58892: Added missing transaction(s) in NodeServiceTest (MNT-9806) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@62327 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -10,6 +10,7 @@ import java.util.Collections;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
@@ -320,10 +321,30 @@ public class UnlockMethodTest
|
||||
WebDAVHelper davHelper = (WebDAVHelper) appContext.getBean("webDAVHelper");
|
||||
unlockMethod.setDetails(request, new MockHttpServletResponse(), davHelper, folderNodeRef);
|
||||
unlockMethod.parseRequestHeaders();
|
||||
unlockMethod.executeImpl();
|
||||
transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionCallback<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void execute() throws Throwable
|
||||
{
|
||||
unlockMethod.executeImpl();
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
fail("Exception should have been thrown, but wasn't.");
|
||||
}
|
||||
catch (AlfrescoRuntimeException e)
|
||||
{
|
||||
if (e.getCause() instanceof WebDAVServerException)
|
||||
{
|
||||
WebDAVServerException ee = (WebDAVServerException) e.getCause();
|
||||
assertEquals(HttpServletResponse.SC_PRECONDITION_FAILED, ee.getHttpStatusCode());
|
||||
}
|
||||
else
|
||||
{
|
||||
fail("Incorrect exception thrown.");
|
||||
}
|
||||
}
|
||||
catch (WebDAVServerException e)
|
||||
{
|
||||
assertEquals(HttpServletResponse.SC_PRECONDITION_FAILED, e.getHttpStatusCode());
|
||||
|
Reference in New Issue
Block a user