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

Ng Tsz Sum edited comment on LANG-1693 at 12/7/22 2:36 PM:
-----------------------------------------------------------

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


was (Author: samabcde):
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