Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-9193

Improve broker shutdown logic in unit tests to improve test reliability

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.17.3
    • 5.18.0, 5.17.4
    • Broker
    • None

    Description

      A lot of the test failures that happen in CI are due to brokers that were not shut down properly in previous test runs (so ports are not open or JMX interferes, etc). I have noticed a lot of the reason is simply not wrapping code that is called before stopping the broker in a try/catch (such as connection.close()) so that if the previous code fails the broker doesn't get stopped.

      The goal here is to just try and go through and find places in the unit tests where broker stop can be better handled to try and limit some of the issues when running in CI.

      Another issue altogether is that the tests would be much more reliable if random ports were used and not hard coded ports but that is a much bigger task to change for all tests so would be another issue if needed.

      Attachments

        Activity

          People

            cshannon Christopher L. Shannon
            cshannon Christopher L. Shannon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: