openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allee8...@apache.org
Subject svn commit: r773149 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/lockmgr/SequencedActionsTest.java
Date Sat, 09 May 2009 01:20:23 GMT
Author: allee8285
Date: Sat May  9 01:20:22 2009
New Revision: 773149

URL: http://svn.apache.org/viewvc?rev=773149&view=rev
Log:
OPENJPA-891 Fine tune test case to optimize runtime duration.

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/lockmgr/SequencedActionsTest.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/lockmgr/SequencedActionsTest.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/lockmgr/SequencedActionsTest.java?rev=773149&r1=773148&r2=773149&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/lockmgr/SequencedActionsTest.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/lockmgr/SequencedActionsTest.java
Sat May  9 01:20:22 2009
@@ -72,7 +72,7 @@
             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 @@
         if (waitInMsec == -1) {
             speedCnt = platformSpeedTest();
             try {
-                waitInMsec = MinThreadWaitInMs + 500000 / (speedCnt / 1000000);
+                waitInMsec = MinThreadWaitInMs + 250000 / (speedCnt / 1000000);
             } catch (Throwable t) {
             }
         }
@@ -534,8 +534,8 @@
                     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 {



Mime
View raw message