commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@gmx.de>
Subject Re: Re: [nightly build] id failed.
Date Wed, 06 Sep 2006 21:39:45 GMT
Hi Phil,

Phil Steitz wrote:

> On 9/6/06, Jörg Schaible <joerg.schaible@gmx.de> wrote:
[snip]
>>
>> and the failing test for SqlDateConverterTestCase is because of a wrong
>> implementation of the test. Look at
>> DateConverterTestBase.testConvertDate. It fails to initialize the
>> Calendar object with the right time. Despite the other objects, this one
>> must be initialized separate, simply add the line:
>>
>> ((Calendar)date[1]).setTimeInMillis(now);
>>
>> and the test is independent of any time slice.
>>
>> - Jörg
>>
> 
> Hmmm...I am sure the [beanutils] devs would not mind having this test
> case patched, or at least a Jira with patch attached. 

Well, I just did not want to commit to a project I never committed before.

> Thanks for 
> looking into this and thanks for the reference above, though I did not
> really find any "fixes" there.

The test takes the current time in ms as "now" and creates different
time-based objects all initialized with "now" - except the
GregorianCalendar instance. For this object the code simply assumes, that
that the internal call to System.getCurrentMillis() will still return the
same value.

The assertions expects later all the time-based objects to represent "now".
This assumption will fail occasionally if the time slice switched ... and
even more likely if the machine shifts the time ;-)

- Jörg


---------------------------------------------------------------------
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