openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r798662 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/conf/TestSpecificationConfiguration.java
Date Tue, 28 Jul 2009 19:19:52 GMT
Author: dwoods
Date: Tue Jul 28 19:19:51 2009
New Revision: 798662

URL: http://svn.apache.org/viewvc?rev=798662&view=rev
Log:
OPENJPA-1076 Handle changes in geronimo-jpa_2.0_spec Rev798659 to not wrapper all exceptions
as PersistenceExceptions and allow the spec to call other providers it discovers.  We'll keep
the createEMF behavior of returning exceptions sometimes instead of null, until we see if
the JPA2 TCK forces the issue....

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

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/conf/TestSpecificationConfiguration.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/conf/TestSpecificationConfiguration.java?rev=798662&r1=798661&r2=798662&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/conf/TestSpecificationConfiguration.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/conf/TestSpecificationConfiguration.java
Tue Jul 28 19:19:51 2009
@@ -57,15 +57,19 @@
         assertEquals(1, spec.getVersion());
     }
     
+    /*
+     * Slight change for 2.0, in that the geronimo spec does not rethrow
+     * all exceptions wrapped as a PersistenceException
+     */
     public void testHigherVersionCanNotBeSet() {
         try {
             super.setUp("openjpa.Specification", "jpa 3.0", 
                 "openjpa.Log", "DefaultLevel=WARN");
             fail("Expected to fail with higher Spec version");
-        } catch (PersistenceException ex) {
+        } catch (IllegalArgumentException ex) {
             // good
             emf.getConfiguration().getLog("Tests").trace(
-                "Caught expected PersistenceException = " + ex);
+                "Caught expected IllegalArgumentException = " + ex);
         }
     }
     



Mime
View raw message