Running Quarkus test with reactive messaging and get java.lang.IllegalStateException: No CDI container is available #43894
Closed
joe-specimen
started this conversation in
Community
Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
-
The answer was provided by @Ladicek in the following post #43902 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to learn quarkus-messaging-amqp and that is why I created a very simple project where I have one consumer which has
@Incoming("executor-in")
annotation where I log what was consumed (Executor
object). I also createdMessageConverter
where I convert from Json string to object (Executor
). Now when I send serializedExecutor
object inside my Junit 5 test I getjava.lang.IllegalStateException: No CDI container is available
which I do not know why. This happens if I run the test inside Intellij.NOTE
One important thing is that the test is working but method for message consuming is not being called.
The funny thing is that if I do not convert Json to
Executor
(insideMessageConverter
class) object and just resendMessage<?>
with Json payload and change method argument from Executor to String then everything works.To not pollute the space too much with the code I also attach link to project on GitHub: link
Thanks for any help in advance.
Beta Was this translation helpful? Give feedback.
All reactions