[jboss-jira] [JBoss JIRA] (LOGMGR-196) PeriodicRotatingFileHandlerTests.testFailedRotate fails on JDK10+

James Perkins (JIRA) issues at jboss.org
Thu Jul 5 14:08:00 EDT 2018


     [ https://issues.jboss.org/browse/LOGMGR-196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Perkins reassigned LOGMGR-196:
------------------------------------

    Assignee: James Perkins


> PeriodicRotatingFileHandlerTests.testFailedRotate fails on JDK10+
> -----------------------------------------------------------------
>
>                 Key: LOGMGR-196
>                 URL: https://issues.jboss.org/browse/LOGMGR-196
>             Project: JBoss Log Manager
>          Issue Type: Task
>    Affects Versions: 2.1.0.Final
>            Reporter: Nikoleta Žiaková
>            Assignee: James Perkins
>            Priority: Minor
>
> {code}
> [ERROR] Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.035 s <<< FAILURE! - in org.jboss.logmanager.handlers.PeriodicRotatingFileHandlerTests
> [ERROR] testFailedRotate(org.jboss.logmanager.handlers.PeriodicRotatingFileHandlerTests)  Time elapsed: 0.023 s  <<< FAILURE!
> java.lang.AssertionError: The rotated file '/home/nziakova/testing/logging/jboss-logmanager/target/logs/periodic-rotating-file-handler.log.28' exists and should not
> {code}
> It seems like the byteman rule is not executed on JDK10+. However, after upgrading the byteman version to 4.0.1, which should support JDK10, I get following error:
> {code}
> org.jboss.byteman.rule.exception.ParseException: rule Test failed rotated
> File org.jboss.logmanager.handlers.PeriodicRotatingFileHandlerTests+testFailedRotate line 6 : illegal character in string <\>
> {code}
> Looks like hitting BYTEMAN-346 when escaping the backslash because updating the condition to following one works:
> {code}
> condition = "$2.getFileName().toString().matches(\"periodic-rotating-file-handler\\\\.log\\\\.\\\\d+\")",
> {code}
> I'm not sure what should be the proper fix here - is adjusting the backslash escaping in the test enough?



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)



More information about the jboss-jira mailing list