openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r739178 - in /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa: conf/TestDynamicConfiguration.java persistence/test/PersistenceTestCase.java
Date Fri, 30 Jan 2009 05:33:42 GMT
Author: ppoddar
Date: Fri Jan 30 05:33:42 2009
New Revision: 739178

URL: http://svn.apache.org/viewvc?rev=739178&view=rev
Log:
Reuse EMF.

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/conf/TestDynamicConfiguration.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/conf/TestDynamicConfiguration.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/conf/TestDynamicConfiguration.java?rev=739178&r1=739177&r2=739178&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/conf/TestDynamicConfiguration.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/conf/TestDynamicConfiguration.java
Fri Jan 30 05:33:42 2009
@@ -40,11 +40,11 @@
 	}
 	
     public void testConfigurationIsEqualByValueAndHashCode() {
-		OpenJPAEntityManagerFactorySPI emf1 = createEMF();
+		OpenJPAEntityManagerFactorySPI emf1 = createEMF(FRESH_EMF);
 		assertNotNull(emf1);
 		OpenJPAConfiguration conf1 = emf1.getConfiguration();
 		
-		OpenJPAEntityManagerFactorySPI emf2 = createEMF();
+		OpenJPAEntityManagerFactorySPI emf2 = createEMF(FRESH_EMF);
 		assertNotNull(emf2);
 		OpenJPAConfiguration conf2 = emf2.getConfiguration();
 		

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java?rev=739178&r1=739177&r2=739178&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java
Fri Jan 30 05:33:42 2009
@@ -149,7 +149,7 @@
         }
         EMFKey key = new EMFKey(pu, map);
         OpenJPAEntityManagerFactorySPI oemf = _emfs.get(key);
-        if (fresh || oemf == null) {
+        if (fresh || oemf == null || !oemf.isOpen()) {
             Map config = new HashMap(System.getProperties());
             config.putAll(map);
             oemf = (OpenJPAEntityManagerFactorySPI) 



Mime
View raw message