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

Christopher L. Shannon commented on AMQ-6106:
---------------------------------------------

Thanks for the pull request...this is a good start but the main thing missing 
would be a way to configure the BrokerService before calling start.  Maybe 
having an initialization method that gets called before starting the broker 
would be a good idea.  Each test typically has a different broker configuration 
and being able to do something like the following in a unit test would be 
necessary to make the Rule usable.

{code:java}
@Rule
public EmbeddedActiveMQBroker broker = new EmbeddedActiveMQBroker() {
    @Override
    public void init() {
        brokerService.setKeepDurableSubsActive(false);
    }
};
{code}

[~tabish121], Do you think this is a good spot for this which is currently a 
new subproject called activemq-junit under tooling?  It seems like a good place 
to me because then it can be included in other modules for testing like 
activemq-http or activemq-unit-tests as a testing dependency.

> JUnit Rule for embedded ActiveMQ Broker
> ---------------------------------------
>
>                 Key: AMQ-6106
>                 URL: https://issues.apache.org/jira/browse/AMQ-6106
>             Project: ActiveMQ
>          Issue Type: New Feature
>    Affects Versions: 5.13.0
>            Reporter: Quinn Stevenson
>            Priority: Minor
>
> Add a JUnit Rule to simplify using embedded ActiveMQ brokers in JUnit tests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to