openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtyle...@apache.org
Subject svn commit: r782217 - in /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence: kernel/TestDateQueries.java query/TestQueryTimeout.java
Date Sat, 06 Jun 2009 10:08:12 GMT
Author: mtylenda
Date: Sat Jun  6 10:08:11 2009
New Revision: 782217

URL: http://svn.apache.org/viewvc?rev=782217&view=rev
Log:
OPENJPA-1124: Make TestDateQueries and TestQueryTimeout pass regardless of system locale

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/TestDateQueries.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryTimeout.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/TestDateQueries.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/TestDateQueries.java?rev=782217&r1=782216&r2=782217&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/TestDateQueries.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/TestDateQueries.java
Sat Jun  6 10:08:11 2009
@@ -32,6 +32,7 @@
 import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 
 
 
@@ -61,7 +62,8 @@
         throws Exception {
         super.setUp();
 
-        SimpleDateFormat sdf = new SimpleDateFormat("MMMMM dd, yyyy");
+        SimpleDateFormat sdf = new SimpleDateFormat("MMMMM dd, yyyy",
+            Locale.US);
         _date = sdf.parse("April 26, 1978");
         _before = sdf.parse("April 25, 1978");
         _after = sdf.parse("April 27, 1978");

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryTimeout.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryTimeout.java?rev=782217&r1=782216&r2=782217&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryTimeout.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryTimeout.java
Sat Jun  6 10:08:11 2009
@@ -16,6 +16,7 @@
 import java.sql.Connection;
 import java.sql.SQLException;
 import java.sql.Statement;
+import java.text.NumberFormat;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -796,7 +797,8 @@
         } catch (Exception e) {
             // expected - setHint(-2000) should cause IllegalArgumentException
             checkException("testQueryTimeout5()", e, 
-                IllegalArgumentException.class, "invalid timeout of -2,000");
+                IllegalArgumentException.class, "invalid timeout of "
+                + NumberFormat.getIntegerInstance().format(setTime));
         } finally {
             if ((em != null) && em.isOpen()) {
                 em.close();



Mime
View raw message