New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing transacted routes with Quarkus and CamelTestSupport fails #3379
Comments
Well, I think we've not support the |
I can, but I'm getting the same behavior when annotating the Class with |
Please check with our JtaTest, or you can get more details about how to write a test with Quarkus from https://quarkus.io/guides/getting-started-testing |
Thanks for the links! The thing is, I am trying to test a camel route that has the By the way, is this the right place to raise the issue? I opened it here, because there are a lot of examples of similar tests with Spring online that allegedly work. |
I understand and just create a camel-test-demo to show how to use Free feel to give some feedback. |
I'm not sure this is a good way but it just works. |
Perfect, this solved my problem! Thanks a lot. :) I think it's a good solution, after all in most cases it does not matter which specific CamelContext instance a test uses. |
What a cute hack, @zhfeng! Could you perhaps mention it in #1981 where some folks asked for Hm... on the same note, I wonder whether we could somehow set the context automatically. Either by having our own subclass of |
@ppalaga yeah, that could be a better way to have a junit5 extension. I will investigate it after the holidays. |
Dear all,
I have problems testing routes with CamelTestSupport in a Quarkus project when a transacted() definition is part of the route.
Describe the bug
The exchanges do not seem to reach the endpoints, when "transacted()" is part of the route.
Snippets:
Here's a Gist of my test setup and the pom.xml: https://gist.github.com/radio042/b71717d5634eaa634c9affc1021eacfb#file-transactedtest-java
Expected behavior
Messages sent to a route with a transacted() definition using CamelTestSupport in a Quarkus project reach the endpoints and the test is green.
Actual behavior
The test fails with
java.lang.AssertionError: mock://out Received message count. Expected: <1> but was: <0>
How to Reproduce?
Run the test from the gist inside a Quarkus project
The text was updated successfully, but these errors were encountered: