From 1c76ad58a8ef40533e3185baf221e8d551359996 Mon Sep 17 00:00:00 2001 From: Donald Woods Date: Thu, 8 Apr 2010 18:13:38 +0000 Subject: [PATCH] OPENJPA-1619 Fix intermittent TestTimestampVersion failures on various DBs when running on Windows git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@932043 13f79535-47bb-0310-9956-ffa450edef68 --- .../persistence/jdbc/update/TestTimestampVersion.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/update/TestTimestampVersion.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/update/TestTimestampVersion.java index 9c57c00d7..6e988bc23 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/update/TestTimestampVersion.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/update/TestTimestampVersion.java @@ -47,7 +47,7 @@ public class TestTimestampVersion extends SingleEMFTestCase { 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 extends SingleEMFTestCase { 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() {