ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Atherton <br...@callenish.com>
Subject Re: [PATCH] Core Selector Tests
Date Thu, 30 May 2002 23:11:42 GMT
At 05:01 PM 5/30/2002 -0400, Erik Hatcher wrote:
>Bruce,
>
>I'm going to apply your patches, but I'm getting this:
>
>Testcase:
>testSelectionBehaviour(org.apache.tools.ant.types.selectors.DateSelect
>orTest):        FAILED
>expected:<TTFFTFFFTTTT> but was:<TFFFFFFFFFFT>
>junit.framework.AssertionFailedError: expected:<TTFFTFFFTTTT> but
>was:<TFFFFFFFF
>FFT>
>         at junit.framework.Assert.fail(Assert.java:51)
>         at junit.framework.Assert.failNotEquals(Assert.java:234)
>         at junit.framework.Assert.assertEquals(Assert.java:68)
>         at junit.framework.Assert.assertEquals(Assert.java:75)
>         at
>org.apache.tools.ant.types.selectors.DateSelectorTest.testSelectionBe
>haviour(DateSelectorTest.java:194)

Well, at least the tests are working as they should. It passes on my 
platform, which is Debian Linux running JDK 1.3.1_02. The problem is 
platform specific.

This test is explicitly setting the number of milliseconds since January 
1st, 1970 to 1006347300000L and checking for files which have exactly the 
same lastModified() timestamp. Now that I think of it, doesn't Windows have 
a 2 second granularity to its file system? I'm guessing the test failed for 
you on a Windows box. This failure is telling me that we need a granularity 
attribute on DateSelector in addition to DependSelector.

I'll whip up a patch to add this attribute and try to get it out tonight. I 
should probably set the default granularity to 2000 on Windows systems, 0 
on everything else. If the patch is too late for Beta 2, you can just 
comment out the assertion on line 194 of DateSelectorTest and I'll get it 
all fixed up afterwards.

Thanks.



--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message