-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Handle primitive HTTP client responses with MessageBodyReader #10699
Conversation
9ba172a
to
d3f9794
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it misses a test
@sdelamo I'm happy to add a test. Any guidance on the best place to put the test? Should I add a test to |
So as I was writing the tests, I was initially unable to reproduce the problem. It turns out it was being masked in the tests because I do think this should be fixed though, because that I was going to put the test right next to io.micronaut.http.body.ConversionTextPlainHandlerSpec, but that Gradle module includes |
2bdbbba
to
fc48c46
Compare
@sdelamo I pushed up some tests which fail on 4.3.x and pass on my branch. As I mentioned above, I had to block NettyConverters to get it to fail. Is there a better way to block NettyConverters? I also noticed some tests which were leaking controllers into other tests, so I cleaned those up while I was at it. @dstepanov The approach I took of creating a mock NettyConverters meant I had to make it non-final. I see you were the one that made it final. Are you ok with that change? |
c487d0f
to
038437a
Compare
038437a
to
34b97cd
Compare
…loaded Fixes issue micronaut-projects#10698 Also fixed some tests which had controllers leaking into other tests.
34b97cd
to
c51a273
Compare
Also, any chance this can make it into 4.4? |
@kevin-wise Maybe you can just use |
Looks like Update: it seemed to have worked, but the input/output tests don't actually fail without the bug fix, so somehow the converters are still getting registered. I'll keep looking for some combination that works. The error with
|
Ok, found a combination that worked. The solution was to mock the interface instead of the class. The interface is what we care about anyway.
|
@sdelamo I noticed you changed the base branch to 4.5. Any chance this could make it in 4.4.x? |
imo this is sufficiently bug-fixy to make it into a patch release of core |
@sdelamo WDYT, 4.4.x? |
I will cherry picked it and port it to 4.4.x |
Fixes issue #10698 Also fixed some tests which had controllers leaking into other tests. * Mock TypeConverterRegistrar so NettyConverters can stay final
Thanks! |
Thank you for the contribution! |
Fixes issue #10698