You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by dw...@apache.org on 2010/04/08 23:54:21 UTC

svn commit: r932139 - in /openjpa/trunk: openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence...

Author: dwoods
Date: Thu Apr  8 21:54:21 2010
New Revision: 932139

URL: http://svn.apache.org/viewvc?rev=932139&view=rev
Log:
OPENJPA-1616 Fix TestTimeoutException tests for Oracle and re-enable for DB2

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/CacheTest.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestTimeoutException.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml?rev=932139&r1=932138&r2=932139&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml Thu Apr  8 21:54:21 2010
@@ -164,7 +164,7 @@
 	</dictionary>
 	
 	<dictionary class="org.apache.openjpa.jdbc.sql.OracleDictionary">
-		<lock>42000,61000</lock>
+		<lock>42000,61000,72000</lock>
 		<referential-integrity>1,1400,1722,2291,2292</referential-integrity>
 		<object-exists>23000</object-exists>
 		<object-not-found></object-not-found>

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/CacheTest.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/CacheTest.java?rev=932139&r1=932138&r2=932139&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/CacheTest.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/CacheTest.java Thu Apr  8 21:54:21 2010
@@ -1027,8 +1027,8 @@ public abstract class CacheTest extends 
                 DataCache.NAME_DEFAULT, false);
             checkCache(cache, ids, new boolean[]{ true, true, true, true });
 
-            // should cause h to be dropped.
-            Thread.currentThread().sleep(551);
+            // should cause h to be dropped (timeout=500)
+            Thread.currentThread().sleep(600);
             Thread.yield();
             checkCache(cache, ids, new boolean[]{ true, true, true, false });
 
@@ -1039,8 +1039,8 @@ public abstract class CacheTest extends 
             boolean eStatus = !((((OpenJPAEntityManagerFactorySPI) factory)
                     .getConfiguration()).getDataCacheTimeout() > 0);
 
-            // should cause f to be dropped.
-            Thread.currentThread().sleep(550);
+            // should cause f to be dropped (timeout=1000)
+            Thread.currentThread().sleep(500);
             Thread.yield();
             checkCache(cache, ids,
                 new boolean[]{ eStatus, false, true, false });
@@ -1051,8 +1051,8 @@ public abstract class CacheTest extends 
             assertInCache(q1, (eStatus) ? Boolean.TRUE : Boolean.FALSE);
             assertInCache(q2, Boolean.FALSE);
 
-            // should cause g to be dropped.
-            Thread.currentThread().sleep(4050);
+            // should cause g to be dropped (timeout=5000)
+            Thread.currentThread().sleep(4000);
             Thread.yield();
             checkCache(cache, ids,
                 new boolean[]{ eStatus, false, false, false });

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestTimeoutException.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestTimeoutException.java?rev=932139&r1=932138&r2=932139&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestTimeoutException.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestTimeoutException.java Thu Apr  8 21:54:21 2010
@@ -44,7 +44,7 @@ public class TestTimeoutException extend
 
     public void setUp() {
         // TODO - Hack until OPENJPA-1594 is addressed
-        setUnsupportedDatabases(OracleDictionary.class, DB2Dictionary.class);
+        // setUnsupportedDatabases(OracleDictionary.class, DB2Dictionary.class);
         
         // Disable tests for any DB that has supportsSelectForUpdate==false, like HSQLDictionary
         OpenJPAEntityManagerFactorySPI tempEMF = emf;