OPENJPA-891 Fine tune test case to optimize runtime duration.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@773149 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Albert Lee 2009-05-09 01:20:22 +00:00
parent 3eff16e07a
commit f6f99775bf
1 changed files with 4 additions and 4 deletions

View File

@ -72,7 +72,7 @@ public abstract class SequencedActionsTest extends SQLListenerTestCase {
javax.persistence.PessimisticLockException.class,
javax.persistence.LockTimeoutException.class };
protected static final int MinThreadWaitInMs = 45000;
protected static final int MinThreadWaitInMs = 10000;
private long waitInMsec = -1;
private String empTableName;
@ -110,7 +110,7 @@ public abstract class SequencedActionsTest extends SQLListenerTestCase {
if (waitInMsec == -1) {
speedCnt = platformSpeedTest();
try {
waitInMsec = MinThreadWaitInMs + 500000 / (speedCnt / 1000000);
waitInMsec = MinThreadWaitInMs + 250000 / (speedCnt / 1000000);
} catch (Throwable t) {
}
}
@ -534,8 +534,8 @@ public abstract class SequencedActionsTest extends SQLListenerTestCase {
if (args.length > 2 && args[2] != null) {
waitTime = (Integer) args[2];
}
if( waitTime < 15000)
waitTime = 15000;
if (waitTime < MinThreadWaitInMs / 2)
waitTime = MinThreadWaitInMs / 2;
if( waitThreadid != 0) {
thisThread.wait(waitTime);
} else {