openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r932081 - /openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/update/TestTimestampVersion.java
Date Thu, 08 Apr 2010 19:52:03 GMT
Author: dwoods
Date: Thu Apr  8 19:52:03 2010
New Revision: 932081

URL: http://svn.apache.org/viewvc?rev=932081&view=rev
Log:
OPENJPA-1619 Fix intermittent TestTimestampVersion failures on various DBs when running on
Windows

Modified:
    openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/update/TestTimestampVersion.java

Modified: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/update/TestTimestampVersion.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/update/TestTimestampVersion.java?rev=932081&r1=932080&r2=932081&view=diff
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/update/TestTimestampVersion.java
(original)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/update/TestTimestampVersion.java
Thu Apr  8 19:52:03 2010
@@ -47,7 +47,7 @@ public class TestTimestampVersion extend
         
         try {
             // delay to ensure the new timestamp exceeds the timer's resolution.
-            Thread.sleep(100);
+            Thread.sleep(500);
         } catch (InterruptedException e) {
         }
 
@@ -63,7 +63,8 @@ public class TestTimestampVersion extend
         em.getTransaction().begin();
         em.refresh(pc);
         Timestamp newVersion = pc.getVersion();
-        assertTrue(newVersion.after(oldVersion));
+        assertTrue("Expected newVersion=" + newVersion.toString() + " to be after oldVersion="
+ oldVersion.toString(),
+            newVersion.after(oldVersion));
     }
     
     public void testBulkUpdateOnNumericVersion() {



Mime
View raw message