commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (VALIDATOR-369) DateValidatorTest.testCompare() fails with GMT-12
Date Thu, 05 Nov 2015 23:48:27 GMT

     [ https://issues.apache.org/jira/browse/VALIDATOR-369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sebb resolved VALIDATOR-369.
----------------------------
    Resolution: Fixed

The tests were doing comparisons of GMT dates with the default Timezone.
Not sure that makes sense, so changed the tests to use GMT for the comparisons.

URL: http://svn.apache.org/viewvc?rev=1712877&view=rev
Log:
VALIDATOR-369 DateValidatorTest.testCompare() fails with GMT-12

Modified:
    commons/proper/validator/trunk/src/changes/changes.xml
    commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/DateValidatorTest.java

> DateValidatorTest.testCompare() fails with GMT-12
> -------------------------------------------------
>
>                 Key: VALIDATOR-369
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-369
>             Project: Commons Validator
>          Issue Type: Bug
>          Components: Routines
>    Affects Versions: 1.4.1 Release
>            Reporter: Emmanuel Bourg
>             Fix For: 1.5.0
>
>
> There is a test failure when the system timezone is set to GMT-12:
> {code}
> Tests run: 8, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.02 sec <<<
FAILURE! - in org.apache.commons.validator.routines.DateValidatorTest
> testCompare(org.apache.commons.validator.routines.DateValidatorTest)  Time elapsed: 0.004
sec  <<< FAILURE!
> junit.framework.AssertionFailedError: date EQ expected:<0> but was:<1>
>         at junit.framework.Assert.fail(Assert.java:57)
>         at junit.framework.Assert.failNotEquals(Assert.java:329)
>         at junit.framework.Assert.assertEquals(Assert.java:78)
>         at junit.framework.Assert.assertEquals(Assert.java:234)
>         at junit.framework.TestCase.assertEquals(TestCase.java:401)
>         at org.apache.commons.validator.routines.DateValidatorTest.testCompare(DateValidatorTest.java:126)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message