mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Increased wait times in test; Expiry to use '>' again.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14532 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -293,9 +293,9 @@ public class LockDAOTest extends TestCase
|
|||||||
public synchronized void testLockExpiry() throws Exception
|
public synchronized void testLockExpiry() throws Exception
|
||||||
{
|
{
|
||||||
lock(lockAAA, 50L, true);
|
lock(lockAAA, 50L, true);
|
||||||
this.wait(50L);
|
this.wait(100L);
|
||||||
lock(lockAA, 50L, true);
|
lock(lockAA, 50L, true);
|
||||||
this.wait(50L);
|
this.wait(100L);
|
||||||
lock(lockA, 100L, true);
|
lock(lockA, 100L, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -308,10 +308,10 @@ public class LockDAOTest extends TestCase
|
|||||||
String tokenAAA = lock(lockAAA, 500L, true);
|
String tokenAAA = lock(lockAAA, 500L, true);
|
||||||
release(lockAAA, tokenAAA, true);
|
release(lockAAA, tokenAAA, true);
|
||||||
tokenAAA = lock(lockAAA, 50L, true); // Make sure we can re-acquire the lock
|
tokenAAA = lock(lockAAA, 50L, true); // Make sure we can re-acquire the lock
|
||||||
this.wait(50L); // Wait for expiry
|
this.wait(100L); // Wait for expiry
|
||||||
String grabbedTokenAAAA = lock(lockAAA, 50L, true); // Grabbed lock over the expiry
|
String grabbedTokenAAAA = lock(lockAAA, 50L, true); // Grabbed lock over the expiry
|
||||||
release(lockAAA, tokenAAA, false); // Can't release any more
|
release(lockAAA, tokenAAA, false); // Can't release any more
|
||||||
this.wait(50L); // Wait for expiry
|
this.wait(100L); // Wait for expiry
|
||||||
release(lockAAA, grabbedTokenAAAA, true); // Proof that expiry, on it's own, doesn't prevent release
|
release(lockAAA, grabbedTokenAAAA, true); // Proof that expiry, on it's own, doesn't prevent release
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -102,7 +102,7 @@ public class LockEntity
|
|||||||
|
|
||||||
public boolean hasExpired()
|
public boolean hasExpired()
|
||||||
{
|
{
|
||||||
return System.currentTimeMillis() >= expiryTime;
|
return System.currentTimeMillis() > expiryTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getId()
|
public Long getId()
|
||||||
|
Reference in New Issue
Block a user