openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r814644 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/TestWriteBehindConfigurations.java
Date Mon, 14 Sep 2009 13:54:59 GMT
Author: dwoods
Date: Mon Sep 14 13:54:59 2009
New Revision: 814644

URL: http://svn.apache.org/viewvc?rev=814644&view=rev
Log:
OPENJPA-1247  WriteBehindCallback sleepTime interval of one EMF datacache adversely impacting
other EMF datacache (testcase for OPENJPA-1296).  Contributed by Tim McConnell.

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/TestWriteBehindConfigurations.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/TestWriteBehindConfigurations.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/TestWriteBehindConfigurations.java?rev=814644&r1=814643&r2=814644&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/TestWriteBehindConfigurations.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/TestWriteBehindConfigurations.java
Mon Sep 14 13:54:59 2009
@@ -26,6 +26,8 @@
 import junit.framework.TestCase;
 
 import org.apache.openjpa.persistence.ArgumentException;
+import org.apache.openjpa.persistence.PersistenceException;
+import org.apache.openjpa.writebehind.WriteBehindConfigurationException;
 
 
 /** 
@@ -51,6 +53,10 @@
         }
         catch (ArgumentException ae) {
         }
+        catch (PersistenceException pe) {
+        }
+        catch (WriteBehindConfigurationException wbce) {
+        }
         catch (Exception e) {
             fail("testInvalidConfiguration01: Caught unexpected exception: " + e);
             e.printStackTrace();
@@ -72,7 +78,7 @@
         Map map = new HashMap();
         map.put( "openjpa.DataCache", "true" );
         map.put( "openjpa.WriteBehindCache", "true");
-        map.put( "openjpa.WriteBehindCallback", "true(sleepTime=1000)" );
+        map.put( "openjpa.WriteBehindCallback", "true(sleepTime=30000)" );
         map.put( "openjpa.RuntimeUnenhancedClasses", "unsupported" );
         try {
             emf02 = Persistence.createEntityManagerFactory("empty-pu", map);
@@ -80,6 +86,10 @@
         }
         catch (ArgumentException ae) {
         }
+        catch (PersistenceException pe) {
+        }
+        catch (WriteBehindConfigurationException wbce) {
+        }
         catch (Exception e) {
             fail("testInvalidConfiguration02: Caught unexpected exception: " + e);
             e.printStackTrace();
@@ -109,6 +119,10 @@
         }
         catch (ArgumentException ae) {
         }
+        catch (PersistenceException pe) {
+        }
+        catch (WriteBehindConfigurationException wbce) {
+        }
         catch (Exception e) {
             fail("testInvalidConfiguration03: Caught unexpected exception: " + e);
             e.printStackTrace();
@@ -137,6 +151,10 @@
         }
         catch (ArgumentException ae) {
         }
+        catch (PersistenceException pe) {
+        }
+        catch (WriteBehindConfigurationException wbce) {
+        }
         catch (Exception e) {
             fail("testInvalidConfiguration04: Caught unexpected exception: " + e);
             e.printStackTrace();
@@ -186,7 +204,7 @@
         map.put( "openjpa.DataCache", "true" );
         map.put( "openjpa.RemoteCommitProvider", "sjvm");
         map.put( "openjpa.WriteBehindCache", "true");
-        map.put( "openjpa.WriteBehindCallback", "true(sleepTime=1000)" );
+        map.put( "openjpa.WriteBehindCallback", "true(sleepTime=30000)" );
         map.put( "openjpa.RuntimeUnenhancedClasses", "supported" );
         try {
             emf06 = Persistence.createEntityManagerFactory("empty-pu", map);
@@ -213,7 +231,7 @@
         map.put( "openjpa.DataCache", "true" );
         map.put( "openjpa.RemoteCommitProvider", "sjvm");
         map.put( "openjpa.WriteBehindCache", "true");
-        map.put( "openjpa.WriteBehindCallback", "true(sleepTime=1000)" );
+        map.put( "openjpa.WriteBehindCallback", "true(sleepTime=30000)" );
         map.put( "openjpa.RuntimeUnenhancedClasses", "warn" );
         try {
             emf07 = Persistence.createEntityManagerFactory("empty-pu", map);



Mime
View raw message