Repository navigation
Conversation
|
@dropwizard/committers I'm not very happy with this implementation as it may cause performance overheads. Should we allow this behavior only when explicitly requested by a user through a property? |
52fe98c to
b49c8f1
Compare
b49c8f1 to
25cf2dd
Compare
Since it's only for HTTP-based tests I'd swallow the pill right now and revisit the issue when there are complaints. |
|
Hi there, I just stumbled over an edge case, likely introduced with this change, that causes a failure when testing for responses with chunked encoding. We verify also the headers to make sure, we are streaming from this endpoint directly. I assume, rewriting to the If someone stumbles over the same or similar issues when testing responses in detail, you can create your own client with the minimum you need for your test. In our case we only need Json deserialization and changed I hope this helps someone who faces a similar issue after upgrading. |
Fixes #9246
When retrieving responses from Jersey clients in the
dropwizard-testingmodule toResponseobjects instead of reading them directly, a user has to ensure theResponsegets closed correctly to release resources of the underlying http client.In earlier versions of dropwizard this wasn't a problem since there an other http client connector was used.
This PR adds a response interceptor reading the whole entity into a byte array to allow releasing http client resources immediately.