Uploaded image for project: 'JBoss Log Manager'
  1. JBoss Log Manager
  2. LOGMGR-196

PeriodicRotatingFileHandlerTests.testFailedRotate fails on JDK10+

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Minor Minor
    • 2.1.3.Final
    • 2.1.0.Final
    • None
    • None

      [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
      

      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:

      org.jboss.byteman.rule.exception.ParseException: rule Test failed rotated
      File org.jboss.logmanager.handlers.PeriodicRotatingFileHandlerTests+testFailedRotate line 6 : illegal character in string <\>
      

      Looks like hitting BYTEMAN-346 when escaping the backslash because updating the condition to following one works:

      condition = "$2.getFileName().toString().matches(\"periodic-rotating-file-handler\\\\.log\\\\.\\\\d+\")",
      

      I'm not sure what should be the proper fix here - is adjusting the backslash escaping in the test enough?

            jperkins-rhn James Perkins
            nziakova@redhat.com Nikoleta Ziakova (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: