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:
Derek Hulley
2007-02-01 14:42:18 +00:00
parent de673986ec
commit a046d9be3f

View File

@@ -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)
{