[CAMEL-4616] camel-jms: test not loosing messages in async TX sends#9015
[CAMEL-4616] camel-jms: test not loosing messages in async TX sends#9015davsclaus merged 1 commit intoapache:mainfrom
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 If necessary Apache Camel Committers may access logs and test results in the job summaries! |
Components tested:
|
|
I see this error, but the same test passed on 2nd run, so its maybe some flake/concurrent issue [ERROR] org.apache.camel.component.jms.issues.AsyncJmsProducerExceptionInTXTest.testAsyncEndpointException Time elapsed: 0.084 s <<< FAILURE! |
|
@davsclaus yes I also saw same thing when I ran camel-jms tests locally on my machine. But I also saw same case for an another test not related at all to my changes (which passed in second run). So I thought maybe it's normal and why camel-jms tries tests multiple times. Should I fix it? |
|
Yeah I think its normal, surefire tries 3 times before failing. It is possible to mark a test to run in isolation if it cannot have other tests run concurrently. That helps in some special tests. |
|
No you do not have to fix it unless you can easily spot what can be done. |
|
@davsclaus by the way, another reason that made me happy to see such exception and to not fix it was that it's an another confirmation and proof for what I'm going to prove with this PR. It showed me that in case of wrong username/password, camel-jms doesn't loose messages when it's in an async transaction send :) maybe I should OR two assertions together. |
|
@davsclaus I could fix it by using a new broker instead of shared one: see #9021 please :) |
Invalidates CAMEL-4616.
I think that the test provided by this PR proves that camel JMS doesn't loose messages in transaction when AtiveMQ uses
async sendinternally and also asynchronously fails. See the test comments to understand what the pull request does, how, and why.