Fix delegation usage in ResumingRouter #5294
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I found a bug with vertx-http, in a case like this
my requests was getting stuck and never returned.
After further investigation I found that the class
ResumingRouterhttps://github.com/quarkusio/quarkus/blob/master/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/ResumingRouter.java wasn't properly implemented and after the call toconsumes(...the underliying router was returned instead of theResumingRouter, this lead into the unexpected behaviour I described above but many other things could be affected.I have a reproducer for this error here https://github.com/famartinrh/quarkus-with-vertx-web
It can be easily tested running
curl -v -H "Content-Type:application/json" -X POST localhost:8080/hi/bug -d "hello world"This PR fixes the incorrected implementation of the delegation in the class
ResumingRouterand adds some modifications to related tests to cover the usecaseSpecial thanks to my mate @juazugas for helping me with the troubleshooting