mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fixed possible wait(0) in test
- wait((long)(rand.nextDouble() * 1000.0)); // Can result in wait(0) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4998 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -160,7 +160,8 @@ public class TransactionAwareSingletonTest extends TestCase
|
||||
// wait for some random time
|
||||
try
|
||||
{
|
||||
wait((long)(rand.nextDouble() * 1000.0)); // wait up to a second
|
||||
// DH: The "+1" is necessary to ensure that wait(0) is never called
|
||||
wait((long)(rand.nextDouble() * 1000.0) + 1); // wait up to a second
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
|
Reference in New Issue
Block a user