Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-7161

System test output lost owing to orphaned shutdown hooks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • Broker-J, Java Tests
    • None

    Description

      When the Broker exits, normally AbstractSystemConfig organises for the shutdown hook to be removed (#onClose). If AbstractSystemConfig fails to close all its children, the step to remove the shutdown hook never gets executed. For normal production use cases this is harmless; the Broker is going down anyway. However when testing the Broker using its system test suite this is problematic.

      Our Logback configuration associates threads to test specific log file. The ShutdownHook still maintains this association, even though QpidTestCase has already told Logback that the test is through org.slf4j.MDC#remove. As Logback believes the test is through, when the Shutdown hook awakes and logs, Logback truncates the tests' logfiles, removing the details of why the test actually failed in the first place.

      Attachments

        Activity

          People

            lorenz.quack Lorenz Quack
            kwall Keith Wall
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: