cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r552267 - /cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DateTimeTypesTest.java
Date Sun, 01 Jul 2007 10:06:18 GMT
Author: aadamchik
Date: Sun Jul  1 03:06:17 2007
New Revision: 552267

URL: http://svn.apache.org/viewvc?view=rev&rev=552267
Log:
frontbase testing
(there seems to be a bug in frontbase driver time handling. Time saved as 1:30:20 is returned
back as 2:30:20...so making the test more fuzzy)

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DateTimeTypesTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DateTimeTypesTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DateTimeTypesTest.java?view=diff&rev=552267&r1=552266&r2=552267
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DateTimeTypesTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DateTimeTypesTest.java
Sun Jul  1 03:06:17 2007
@@ -94,9 +94,11 @@
         assertNotNull(testRead.getTimeColumn());
 
         // OpenBase fails to store seconds for the time
-        // do an approximate match rounding to minutes
+        // FrontBase returns time with 1 hour offset
+        // so this test is approximate...
 
-        assertTrue(Math.abs(nowTime.getTime() - testRead.getTimeColumn().getTime()) <
1000 * 60);
+        long delta = nowTime.getTime() - testRead.getTimeColumn().getTime();
+        assertTrue("" + delta, Math.abs(delta) <= 1000 * 60 * 60);
     }
 
     public void testTimestamp() throws Exception {



Mime
View raw message