mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
ACE-4347 "5.1 Build has had three transient failures related to locking"
Increase the logging for the failing tests to DEBUG so that we can see what's happening during the next failure git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@114288 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -21,6 +21,10 @@ package org.alfresco.repo.webdav;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
@@ -37,6 +41,8 @@ import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.service.transaction.TransactionService;
|
||||
import org.alfresco.util.ApplicationContextHelper;
|
||||
import org.alfresco.util.GUID;
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@@ -47,10 +53,6 @@ import org.springframework.mock.web.MockHttpServletResponse;
|
||||
|
||||
import com.ibm.icu.impl.Assert;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Tests for the WebDAVMethod class.
|
||||
*
|
||||
@@ -81,6 +83,8 @@ public class WebDAVMethodTest
|
||||
public static final String TEST_TENANT_DOMAIN = TEST_RUN+".my.test";
|
||||
public static final String DEFAULT_ADMIN_PW = "admin";
|
||||
|
||||
private Level saveLogLevel;
|
||||
|
||||
protected void setUpApplicationContext()
|
||||
{
|
||||
ApplicationContext appContext = ApplicationContextHelper.getApplicationContext(new String[]
|
||||
@@ -391,6 +395,13 @@ public class WebDAVMethodTest
|
||||
/* MNT-10555 Test */
|
||||
@Test
|
||||
public void expiryLockTest()
|
||||
{
|
||||
// ACE-4347 extra debug logging just for this test so we can see what's going on when it next fails
|
||||
Level repoWebdavSaveLogLevel = Logger.getLogger("org.alfresco.repo.webdav").getLevel();
|
||||
Logger.getLogger("org.alfresco.repo.webdav").setLevel(Level.ALL);
|
||||
Level webdavProtocolSaveLogLevel = Logger.getLogger("org.alfresco.webdav.protocol").getLevel();
|
||||
Logger.getLogger("org.alfresco.webdav.protocol").setLevel(Level.ALL);
|
||||
try
|
||||
{
|
||||
setUpApplicationContext();
|
||||
|
||||
@@ -443,6 +454,12 @@ public class WebDAVMethodTest
|
||||
// Remove test folder.
|
||||
nodeService.deleteNode(folderNodeRef);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Logger.getLogger("org.alfresco.webdav.protocol").setLevel(webdavProtocolSaveLogLevel);
|
||||
Logger.getLogger("org.alfresco.repo.webdav").setLevel(repoWebdavSaveLogLevel);
|
||||
}
|
||||
}
|
||||
|
||||
private void assertStatusCode(int expectedStatusCode, String userAgent)
|
||||
{
|
||||
|
Reference in New Issue
Block a user