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

Jacek Obarymski commented on OPENEJB-2127:
------------------------------------------

Hi Romain,

Thanks for answering so quickly.
1. We use the version 7.0.0-M3.
2. Yes, there is a test in github
https://github.com/CJSCommonPlatform/microservice_framework/blob/master/adapters/messaging-adapter-generator/src/test/java/uk/gov/justice/raml/jms/it/JmsEndpointGenerationIT.java
test case: eventListenerHandlerShouldReceiveEventA()
We have put thread.sleep(300) as a temporary workaround of the problem.

With the thread.sleep removed it fails only occasionally on slower machines 
when the deployment takes longer (in our case was it the Travis CI server), so 
it's not that easy to reproduce.
We discovered the problem after activating ActiveMQ debug logging.
We could then observe the moment when the topic consumer is registered. We then 
put a debug log message after the sendEnvlope() method call in the test case. 
In case of a test failure we observed that sendEnvelope() was called before the 
topic consumer was registered.


> Jms consumers registered after test is started
> ----------------------------------------------
>
>                 Key: OPENEJB-2127
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-2127
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: tests
>            Reporter: Jacek Obarymski
>
> Hi,
> W use OpenEJB for integration testing (with use of the ApplicationComposer 
> JUnit runner).
> We've observed that sometimes JMS consumers are registered after the test is 
> started. 
> If the app under test, listens on a JMS topic, then the message is 
> effectively lost (the app never receives it) and the test fails. This happens 
> occasionally on slower machines.
> This is because the test is started before the app is fully deployed with all 
> JMS consumers registered.



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

Reply via email to