hello list,
I am trying to test a Router using the CamelSpringTestSupport with Camel
2.10.4 and ActiveMQ 5.8.0. My route is configured as follows

from("activemq:queue:incoming").multicast().to("direct:multicast");

from("direct:multicast")
.shutdownRoute(ShutdownRoute.Defer)
.shutdownRunningTask(ShutdownRunningTask.CompleteAllTasks)
.multicast().parallelProcessing().[...]
.bean(producer, "sendSearchRequest").end();

when using CamelSpringTestSupport, I have the following setup
@EndpointInject(uri = "mock:" + "direct:multicast")
private MockEndpoint multicastEndpointMock;

@Override
public String isMockEndpoints() {
    return "*"; 
}

The following test goes green
template.sendBody("activemq:queue:incoming", searchRequest);
multicastEndpointMock.expectedMessageCount(1);

but when the test is finished, I get the following message
[Camel (camel) thread #2 - ShutdownTask] INFO
org.apache.camel.impl.DefaultShutdownStrategy - Waiting as there are still 2
inflight and pending exchanges to complete, timeout in 10 seconds.
[main] WARN org.apache.camel.impl.DefaultShutdownStrategy - Timeout
occurred. Now forcing the routes to be shutdown now.
[Camel (camel) thread #2 - ShutdownTask] WARN
org.apache.camel.impl.DefaultShutdownStrategy - Interrupted while waiting
during graceful shutdown, will force shutdown now.

my questions are
1) why are there 2 inflight and pending exchanges? I believe I have one on
the mock:activemq:queue:incoming consumer and one on the
mock:direct:multicast consumer. Why are they not consumed?

2) how should I consume these exchanges?

anny hints would be highly appreciated!

cheers,
sj



--
View this message in context: 
http://camel.465427.n5.nabble.com/inflight-and-pending-exchanges-during-shutdown-in-a-test-tp5729620.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to