MultipartIntegrationTests should not bind to same part multiple times
DefaultMultipartMessageReader does not cache the part contents, so
binding to the same part multiple times does not work.
Rewrote this test to use separate HTTP request instead.
@ -119,6 +119,36 @@ public class MultipartIntegrationTests extends AbstractHttpHandlerIntegrationTes
@@ -119,6 +119,36 @@ public class MultipartIntegrationTests extends AbstractHttpHandlerIntegrationTes
.verifyComplete();
}
@Test
publicvoidfilePartsFlux(){
Mono<String>result=webClient
.post()
.uri("/filePartFlux")
.syncBody(generateBody())
.retrieve()
.bodyToMono(String.class);
StepVerifier.create(result)
.consumeNextWith(body->assertEquals(
"[fileParts:foo.txt,fileParts:logo.png]",body))
.verifyComplete();
}
@Test
publicvoidfilePartsMono(){
Mono<String>result=webClient
.post()
.uri("/filePartMono")
.syncBody(generateBody())
.retrieve()
.bodyToMono(String.class);
StepVerifier.create(result)
.consumeNextWith(body->assertEquals(
"[fileParts:foo.txt]",body))
.verifyComplete();
}
@Test
publicvoidmodelAttribute(){
Mono<String>result=webClient
@ -160,25 +190,12 @@ public class MultipartIntegrationTests extends AbstractHttpHandlerIntegrationTes
@@ -160,25 +190,12 @@ public class MultipartIntegrationTests extends AbstractHttpHandlerIntegrationTes
@ -195,6 +212,16 @@ public class MultipartIntegrationTests extends AbstractHttpHandlerIntegrationTes
@@ -195,6 +212,16 @@ public class MultipartIntegrationTests extends AbstractHttpHandlerIntegrationTes