mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-15 15:02:20 +00:00
Merged HEAD (5.1) to 5.1.N (5.1.1)
114288 sglover: 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/BRANCHES/DEV/5.1.N/root@114402 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -31,6 +31,8 @@ import org.alfresco.test_category.OwnJVMTestsCategory;
|
||||
import org.alfresco.util.ApplicationContextHelper;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
@@ -355,6 +357,11 @@ public class JobLockServiceTest extends TestCase
|
||||
}
|
||||
|
||||
public synchronized void testLockCallbackReleaseSelf() throws Exception
|
||||
{
|
||||
// ACE-4347 extra debug logging just for this test so we can see what's going on when it next fails
|
||||
Level saveLogLevel = Logger.getLogger("org.alfresco.repo.lock").getLevel();
|
||||
Logger.getLogger("org.alfresco.repo.lock").setLevel(Level.ALL);
|
||||
try
|
||||
{
|
||||
final QName lockQName = QName.createQName(NAMESPACE, getName());
|
||||
final long lockTTL = 1000L;
|
||||
@@ -397,10 +404,16 @@ public class JobLockServiceTest extends TestCase
|
||||
// Check that the timed callback is killed properly
|
||||
int checkedCount = checked[0];
|
||||
int releasedCount = released[0];
|
||||
wait(2000L);
|
||||
System.out.println("X:" + checkedCount + ":" + releasedCount);
|
||||
wait(10000L);
|
||||
assertEquals("Lock callback timer was not terminated", checkedCount, checked[0]);
|
||||
assertEquals("Lock callback timer was not terminated", releasedCount, released[0]);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Logger.getLogger("org.alfresco.repo.lock").setLevel(saveLogLevel);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lets job "run" for 3 seconds and checks at 2s and 4s.
|
||||
|
Reference in New Issue
Block a user