2

I'm running a few integration tests with Qpid (qpid setup based on the answer to this previous question. The application is a Spring Integration flow, receives an incoming message and processes. The test will receive the messages, process, and then check assertions on the outcome of the process.

I managed to start the java broker in the @Before method of the test, and the test will run correctly, but when the test finishes, the broker shuts down on @After, and then (on the client side I think, but I'm not sure), instead of wrapping up, new instances of org.apache.qpid.client.AMQSession.Dispatcher are created, and they end up in an endless loop instead of closing.

[2016-05-20 17:29:28,457][DEBUG][org.springframework.jms.listener.DefaultMessageListenerContainer#0-2][org.apache.qpid.client.AMQSession.Dispatcher] - Dispatcher-2-Conn-2 created [2016-05-20 17:29:28,457][DEBUG][Dispatcher-2-Conn-2][org.apache.qpid.client.AMQSession.Dispatcher] - Dispatcher-2-Conn-2 started

Then Dispatcher-2-Conn-2 will run forever in a loop without ending. Spring is using a org.apache.qpid.client.PooledConnectionFactory as argument for a spring JmsTemplate for sending the messages.

So my questions are:

  • Anybody have any experience with qpid java broker + junit? (beyond the link below) to highlight anything that would be glaringly obvious that I'm missing from the setup/teardown.
  • I think the rebel threads are on the client side rather than the broker. How would one get hold of all sessions/connections/etc created by Spring to properly terminate them?
  • Would killing the vm stop a jenkins build that has this test? :D

(The tests used to run correctly with ActiveMQ, and with far less configuration and setup, but we've been told to move away from ActiveMQ so here we are).

Community
  • 1
  • 1
JGN
  • 85
  • 1
  • 8
  • You need to show all of your test configuration in order for anybody to help. – Gary Russell May 20 '16 at 23:58
  • Hi Gary, thanks for your response. I understand it's pretty difficult to guess anything with this information, but I can't post the actual code without breaking my NDA. I'll try to reproduce it at home and post that configuration instead. – JGN May 23 '16 at 13:00

0 Answers0