[
https://issues.apache.org/jira/browse/CAMEL-26383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18134393#comment-18134393
]
Marcus Ionker commented on CAMEL-26383:
---------------------------------------
The camel-sjms test ReconnectConsumerTest calls reconnect(), yet it passed even
though the Artemis ActiveMQ server was not restarted, because it did not check
for it. Should I extend the test with this fix or should that be left to a
separate ticket?
> camel-test-infra - reconnect() method in AbstractArtemisEmbeddedService does
> nothing
> ------------------------------------------------------------------------------------
>
> Key: CAMEL-26383
> URL: https://issues.apache.org/jira/browse/CAMEL-26383
> Project: Camel
> Issue Type: Bug
> Components: camel-sjms, camel-test-infra
> Affects Versions: 4.23.0
> Reporter: Marcus Ionker
> Priority: Minor
>
> The camel-sjms test class ReconnectConsumerTest calls the reconnect() method,
> which is defined in its parent class JmsExclusiveTestSupport, which calls the
> restart() method on the Artemis service. In the case of this test, it calls
> the default restart method() in the abstract class
> AbstractArtemisEmbeddedService. This restart method does nothing, therefore
> the test fails to achieve the goal of assuring that the consumer reconnects.
> The restart() method should call stop(false) and stop() on the underlying
> ActiveMQServer, eg.
>
> {code:java}
> @Override
> public void restart() {
> try {
> getEmbeddedBrokerService().getActiveMQServer().stop(false);
> getEmbeddedBrokerService().getActiveMQServer().start();
> } catch (Exception e) {
> LOG.error("Failed to restart Artemis ActiveMQ server!", e);
> throw new ArtemisRunException("Artemis ActiveMQ server cannot be
> restarted", e);
> }
> }
> {code}
>
>
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)