mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
JobLockService implementation
- Provides transaction-aware locking - Post-transaction cleanup is automatically done - Retrying for lock acquisition is handled internally as well - Downgraded the lock concurrency tests for the build machine (maybe 50 threads was too much) - Deadlock tests added for the high-level locking git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13968 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -335,7 +335,7 @@ public class LockDAOTest extends TestCase
|
||||
public synchronized void testConcurrentLockAquisition() throws Exception
|
||||
{
|
||||
ReentrantLock threadLock = new ReentrantLock();
|
||||
GetLockThread[] threads = new GetLockThread[50];
|
||||
GetLockThread[] threads = new GetLockThread[5];
|
||||
for (int i = 0; i < threads.length; i++)
|
||||
{
|
||||
threads[i] = new GetLockThread(threadLock);
|
||||
@@ -346,7 +346,7 @@ public class LockDAOTest extends TestCase
|
||||
waitLoop:
|
||||
for (int waitLoop = 0; waitLoop < 50; waitLoop++)
|
||||
{
|
||||
wait(2000L);
|
||||
wait(1000L);
|
||||
for (int i = 0; i < threads.length; i++)
|
||||
{
|
||||
if (!threads[i].done)
|
||||
|
Reference in New Issue
Block a user