-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Description
Affects version: 5.3.3
Related to: #26261
I have a controller method that accepts multipart/form-data
requests with 2 parameters: a file and a @RequestPart String label
.
Previously in my tests I was creating a MockPart
for the label and it was working fine: new MockPart("label", "mainImage".getBytes(UTF_8))
.
With the latest changes in 5.3.3 the MockPart
is converted to a request parameter instead of a multipart boundary and I don't receive anything for the RequestPart
in the controller thus breaking the tests.
Why is it necessary to convert MockParts to parameters in a multipart request?
I'm not sure if this is strictly related to the value being a parameter of if there is another underlying issue. I thought that I should receive the value by using either RequestPart
or RequestParam
just using different converters.