commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joe...@apache.org
Subject svn commit: r441812 - /jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/DateConverterTestBase.java
Date Sat, 09 Sep 2006 16:29:45 GMT
Author: joehni
Date: Sat Sep  9 09:29:44 2006
New Revision: 441812

URL: http://svn.apache.org/viewvc?view=rev&rev=441812
Log:
Fix time slice problem for calendar instance.

Modified:
    jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/DateConverterTestBase.java

Modified: jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/DateConverterTestBase.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/DateConverterTestBase.java?view=diff&rev=441812&r1=441811&r2=441812
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/DateConverterTestBase.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/DateConverterTestBase.java
Sat Sep  9 09:29:44 2006
@@ -18,6 +18,7 @@
 package org.apache.commons.beanutils.converters;
 
 import java.util.Date;
+import java.util.GregorianCalendar;
 
 import junit.framework.TestCase;
 import org.apache.commons.beanutils.Converter;
@@ -78,6 +79,9 @@
             new java.sql.Time(now),
             new java.sql.Timestamp(now)
         };
+        
+        // Initialize calendar also with same ms to avoid a failing test in a new time slice
+        ((GregorianCalendar)date[1]).setTimeInMillis(now);
 
         for (int i = 0; i < date.length; i++) {
             Object val = makeConverter().convert(getExpectedType(), date[i]);



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message