You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Freeman Fang (JIRA)" <ji...@apache.org> on 2018/09/21 10:09:00 UTC

[jira] [Resolved] (KARAF-5917) EventLoggerTest is broken for some timezones.

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

Freeman Fang resolved KARAF-5917.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 4.2.2

> EventLoggerTest is broken for some timezones.
> ---------------------------------------------
>
>                 Key: KARAF-5917
>                 URL: https://issues.apache.org/jira/browse/KARAF-5917
>             Project: Karaf
>          Issue Type: Bug
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>            Priority: Major
>             Fix For: 4.2.2
>
>
> I got failures like
> {code}
> [ERROR] Failures: 
> [ERROR]   EventLoggerTest.testFileSize:230 expected:<[file-2017-11-17-2.log, file-2017-11-17.log, file.log]> but was:<[file-2017-11-17.log, file-2017-11-18.log, file.log]>
> [ERROR]   EventLoggerTest.testFileSizeCompress:255 expected:<[file-2017-11-17-2.log.gz, file-2017-11-17.log.gz, file.log]> but was:<[file-2017-11-17.log.gz, file-2017-11-18.log.gz, file.log]>
> {code}
> This is because is the code this line
> {code}
> for (int i = 0; i < 10; i++) {
>             logger.write(new MapEvent(map, 1510902000000L + TimeUnit.HOURS.toMillis(i)));
>         }
> {code}
> The last event timestamp is 2017-11-17 GMT, while it is 2017-11-18 GMT+8(Beijing time), that's why my tmp files are "file-2017-11-17.log.gz, file-2017-11-18.log.gz, file.log"



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)