You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/01/11 11:23:00 UTC

[jira] [Commented] (AMQ-9193) Improve broker shutdown logic in unit tests to improve test reliability

    [ https://issues.apache.org/jira/browse/AMQ-9193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17672321#comment-17672321 ] 

ASF subversion and git services commented on AMQ-9193:
------------------------------------------------------

Commit a083ff4d23e9ea0997efa5aa596ed5f1c3c6ee24 in activemq's branch refs/heads/main from Christopher L. Shannon (cshannon)
[ https://gitbox.apache.org/repos/asf?p=activemq.git;h=a083ff4d2 ]

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.


> 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)