Skip to content
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

Exception on amqp connection at the end of each test when application terminates #39393

Closed
mnguetsa opened this issue Mar 13, 2024 · 6 comments
Closed
Labels

Comments

@mnguetsa
Copy link
Contributor

mnguetsa commented Mar 13, 2024

Describe the bug

When running my tests I am observing the following exception all the time:

Mutiny had to drop the following exception [Error Occurred After Shutdown]
io.vertx.core.impl.NoStackTraceThrowable: Connection disconnected

This started when I introduced smallrye reactive messaging to communicate with an AMQP broker.
It seems whenever the application terminates during tests the amqp connection is interrupted and that exception is thrown.
Also setting quarkus.shutdown.timeout doesn't help. The amqp connection should be gracefulfy terminated

Expected behavior

No exception after each test run
The amqp connection should be gracefufly terminated

Actual behavior

Not impacting the test but throwing that exception in the output after each test.

How to Reproduce?

I set up this small app for you to quickly reproduce. You just need to run the GreetingResourceTest.java and you can see the exception already.
Checkout the amqp branch here: https://github.com/mnguetsa/quarkus-reproducer/tree/amqp

Output of uname -a or ver

No response

Output of java -version

21

Quarkus version or git rev

3.8.1

Build tool (ie. output of mvnw --version or gradlew --version)

gradle 8.5

Additional information

No response

Copy link

quarkus-bot bot commented Mar 13, 2024

/cc @cescoffier (reactive-messaging), @ozangunalp (reactive-messaging)

@cescoffier
Copy link
Member

So, it's somewhat expected. The error comes from the fact that the AMQP client cannot disconnect properly because the broker has already stopped. We can hide the error when the application is stopping.

@cescoffier
Copy link
Member

@mnguetsa
Copy link
Contributor Author

mnguetsa commented Mar 13, 2024

@cescoffier Thanks a lot for looking into this. Then I can safely ignore this for now in my log output and wait for a quarkus update. The fixing PR you provided is probably coming with the next quarkus version right? or some of next ones

@cescoffier
Copy link
Member

Hello, it's going to be in Quarkus 3.10. I think it's not critical enough to justify a backport in 3.8 and 3.9 (as it's expected and only for tests). My PR just cleans things.

@mnguetsa
Copy link
Contributor Author

Hello, it's going to be in Quarkus 3.10. I think it's not critical enough to justify a backport in 3.8 and 3.9 (as it's expected and only for tests). My PR just cleans things.

Thank you. That's fine for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants