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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to