Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.1
    • Fix Version/s: 1.1.1
    • Labels:
      None

      Description

      When running "mvn install", the unit tests fail.

      The problem is with the tests in the jdk14 directory, ie those that test commons-logging forwarding to a java.util.logging implementation.
      The same tests works fine with java15 on linux. Others have reported that the tests work fine with java16 on Windows.

      The problem seems to be that somehow java.util.logging is not registering our dummy LogHandler implementation that the unit test uses to then verify that the messages have correctly been forwarded.

      Note that this is likely just a problem with the unit test. It is believed that the real commons-logging code actually works fine.

      It appears that the problem has something to do with the tests in the "noop" directory. Changing the pom to do this:
      <excludes>
      <exclude>**/noop/*TestCase.java</exclude>
      </excludes>

      makes the jdk14 tests run fine.

        Activity

        Hide
        Simon Kitching added a comment -

        Ok, found the problem and fixed it with r593871: clear system properties set by the NoOpLogTestCase after test completes.
        This is possibly not the best fix; it would be better to fix this in some central point so it applies to all unit tests. Or have unit tests clear this in their own setUp methods.
        However this patch does the job.

        It's still not entirely clear why this affected only java16, but as it is only a unit test it is not worth spending more time on.

        Show
        Simon Kitching added a comment - Ok, found the problem and fixed it with r593871: clear system properties set by the NoOpLogTestCase after test completes. This is possibly not the best fix; it would be better to fix this in some central point so it applies to all unit tests. Or have unit tests clear this in their own setUp methods. However this patch does the job. It's still not entirely clear why this affected only java16, but as it is only a unit test it is not worth spending more time on.

          People

          • Assignee:
            Simon Kitching
            Reporter:
            Simon Kitching
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development