Nikoleta Žiaková created LOGMGR-196:
---------------------------------------
Summary: 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á
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 {{\}} 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)