Skip to content

Running Quarkus test with reactive messaging and get java.lang.IllegalStateException: No CDI container is available #43902

Closed Answered by Ladicek
joe-specimen asked this question in Q&A
Discussion options

You must be logged in to vote

This is because your test sends the message and immediately stops; it doesn't wait for the processing to finish. When Quarkus stops, an exception like this can happen very easily (as well as a bunch of other exceptions). If you for example add Thread.sleep(5000) to the end of the @Test method, the exception isn't thrown.

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@joe-specimen
Comment options

@Ladicek
Comment options

@joe-specimen
Comment options

@joe-specimen
Comment options

Answer selected by joe-specimen
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area/arc Issue related to ARC (dependency injection) area/smallrye area/reactive-messaging
2 participants