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:
Derek Hulley
2009-06-04 13:02:35 +00:00
parent dc74e02dfb
commit 5cd055bbd7
2 changed files with 5 additions and 5 deletions

View File

@@ -293,9 +293,9 @@ public class LockDAOTest extends TestCase
public synchronized void testLockExpiry() throws Exception
{
lock(lockAAA, 50L, true);
this.wait(50L);
this.wait(100L);
lock(lockAA, 50L, true);
this.wait(50L);
this.wait(100L);
lock(lockA, 100L, true);
}
@@ -308,10 +308,10 @@ public class LockDAOTest extends TestCase
String tokenAAA = lock(lockAAA, 500L, true);
release(lockAAA, tokenAAA, true);
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
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
}

View File

@@ -102,7 +102,7 @@ public class LockEntity
public boolean hasExpired()
{
return System.currentTimeMillis() >= expiryTime;
return System.currentTimeMillis() > expiryTime;
}
public Long getId()