[ 
https://issues.apache.org/jira/browse/LANG-1693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17644357#comment-17644357
 ] 

Ng Tsz Sum commented on LANG-1693:
----------------------------------

By searching *TimeZone.setDefault* some class likeĀ 

*DurationFormatUtilsTest:113* andĀ 

*CalendarUtilsTest:38* does not reset to original timezone.

Probably this is the cause test failed in some specific time (date of month is 
different after changing the timezone)

The fix is to follow *DateUtilsTest* to reset it after test finished

> "CalendarUtilsTest" fails, or not...
> ------------------------------------
>
>                 Key: LANG-1693
>                 URL: https://issues.apache.org/jira/browse/LANG-1693
>             Project: Commons Lang
>          Issue Type: Test
>          Components: lang.time.*
>    Affects Versions: 3.12.0
>            Reporter: Gilles Sadowski
>            Priority: Minor
>         Attachments: OUT
>
>
> Following up a [post on the ML|https://markmail.org/message/qatstzelumanopaj].
> Running
> {noformat} 
> $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 mvn test
> [... skipped ...]
> [ERROR] Failures:
> [ERROR]   CalendarUtilsTest.testGetDayOfMonth:32 expected: <7> but was: <6>
> [ERROR]   CalendarUtilsTest.testGetDayOfYear:37 expected: <341> but was: <340>
> [INFO]
> [ERROR] Tests run: 7330, Failures: 2, Errors: 0, Skipped: 7
> [...]
> {noformat}
> Full console output attached.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to