[
https://issues.apache.org/jira/browse/AMQ-9193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17672322#comment-17672322
]
ASF subversion and git services commented on AMQ-9193:
------------------------------------------------------
Commit 5e12551a4abbb02ac9c07deab258042ef1202042 in activemq's branch
refs/heads/activemq-5.17.x from Christopher L. Shannon (cshannon)
[ https://gitbox.apache.org/repos/asf?p=activemq.git;h=5e12551a4 ]
AMQ-9193 - Improve broker shutdown in unit tests
This should improve test reliability for the unit tests so brokers don't
hang around after the end of a test on error. Also increase the surefire
re-run count to 3 times before failing.
(cherry picked from commit a083ff4d23e9ea0997efa5aa596ed5f1c3c6ee24)
> Improve broker shutdown logic in unit tests to improve test reliability
> -----------------------------------------------------------------------
>
> Key: AMQ-9193
> URL: https://issues.apache.org/jira/browse/AMQ-9193
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.17.3
> Reporter: Christopher L. Shannon
> Assignee: Christopher L. Shannon
> Priority: Major
> Fix For: 5.18.0, 5.17.4
>
>
> 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)