Skip to content

[CAMEL-4616] camel-jms: test not loosing messages in async TX sends#9015

Merged
davsclaus merged 1 commit intoapache:mainfrom
yasserzamani:CAMEL-4616
Jan 9, 2023
Merged

[CAMEL-4616] camel-jms: test not loosing messages in async TX sends#9015
davsclaus merged 1 commit intoapache:mainfrom
yasserzamani:CAMEL-4616

Conversation

@yasserzamani
Copy link
Member

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 send internally and also asynchronously fails. See the test comments to understand what the pull request does, how, and why.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2023

🌟 Thank you for your contribution to the Apache Camel project! 🌟

⚠️ Please note that the changes on this PR may be tested automatically.

If necessary Apache Camel Committers may access logs and test results in the job summaries!

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2023

Components tested:

Total Tested Failed ❌ Passed ✅
1 1 0 1

@davsclaus davsclaus merged commit 3e0262d into apache:main Jan 9, 2023
@davsclaus
Copy link
Contributor

davsclaus commented Jan 9, 2023

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!
org.opentest4j.AssertionFailedError: expected: <Usage Manager Memory Limit reached on queue://AsyncJmsProducerExceptionInTXTest. See http://activemq.apache.org/producer-flow-control.html for more info> but was: <User name [null] or password is invalid.>

@yasserzamani
Copy link
Member Author

@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?

@davsclaus
Copy link
Contributor

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.

@davsclaus
Copy link
Contributor

No you do not have to fix it unless you can easily spot what can be done.

@yasserzamani yasserzamani deleted the CAMEL-4616 branch January 9, 2023 09:12
@yasserzamani
Copy link
Member Author

@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.

@yasserzamani
Copy link
Member Author

yasserzamani commented Jan 9, 2023

@davsclaus I could fix it by using a new broker instead of shared one: see #9021 please :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants