Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-6167

Logging regression on JDK22 EA 08

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 24.0.0.Beta3
    • None
    • Logging

    Description

      The following tests started to fail on JDK22 EA 08 (regression was introduced with this JDK commit)

      testsuite/manualmode

      [ERROR] Failures:
      [ERROR] CLIEmbedHostControllerTestCase.testHelp:327->checkLogging:779
      [ERROR] CLIEmbedHostControllerTestCase.testStdOutDefault:166->stdoutTest:194->checkClientSideLogging:237->checkLogging:779
      [ERROR] CLIEmbedHostControllerTestCase.testStdOutDiscard:172->stdoutTest:194->checkClientSideLogging:237->checkLogging:779
      [ERROR] CLIEmbedHostControllerTestCase.testStdOutEcho:178->stdoutTest:194->checkClientSideLogging:237->checkLogging:779
      [ERROR] CLIEmbedServerTestCase.testHelp:548->checkLogging:748
      [ERROR] CLIEmbedServerTestCase.testStdOutDefault:201->stdoutTest:229->checkClientSideLogging:272->checkLogging:748
      [ERROR] CLIEmbedServerTestCase.testStdOutDiscard:207->stdoutTest:229->checkClientSideLogging:272->checkLogging:748
      [ERROR] CLIEmbedServerTestCase.testStdOutEcho:213->stdoutTest:229->checkClientSideLogging:272->checkLogging:748

      I debugged this problem and found the following:

      on JDK22ea07 and below the System.console() returned null for these tests
      on JDK22ea08 and above the System.console() returns non null value java.io.ProxyingConsole

      Relevant line is: https://github.com/jboss-logging/jboss-logmanager/blob/2.1/src/main/java/org/jboss/logmanager/handlers/ConsoleHandler.java#L60
      This changes the ConsoleHandler behavior because constructor
      https://github.com/jboss-logging/jboss-logmanager/blob/2.1/src/main/java/org/jboss/logmanager/handlers/ConsoleHandler.java#L96
      receives now Target.CONSOLE instead of Target.SYSTEM_OUT as a target.

      The tests expect the text to appear in System.out

      Attachments

        Activity

          People

            jperkins-rhn James Perkins
            ropalka Richard Opalka
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: