Skip to content

Commit b8d3209

Browse files
author
Stephane Maldini
committed
workaround multipart integration test using blocking receive inside netty thread
1 parent 6393e5c commit b8d3209

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

spring-web/src/test/java/org/springframework/http/server/reactive/MultipartIntegrationTests.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,12 @@ private void assertFooPart(Part part) {
103103
assertEquals("fooPart", part.name());
104104
assertTrue(part instanceof FilePart);
105105
assertEquals("foo.txt", ((FilePart) part).filename());
106-
DataBuffer buffer = DataBufferUtils.join(part.content()).block();
107-
assertEquals(12, buffer.readableByteCount());
108-
byte[] byteContent = new byte[12];
109-
buffer.read(byteContent);
110-
assertEquals("Lorem Ipsum.", new String(byteContent));
106+
DataBufferUtils.join(part.content()).subscribe(buffer -> {
107+
assertEquals(12, buffer.readableByteCount());
108+
byte[] byteContent = new byte[12];
109+
buffer.read(byteContent);
110+
assertEquals("Lorem Ipsum.", new String(byteContent));
111+
});
111112
}
112113

113114
private void assertBarPart(Part part) {

0 commit comments

Comments
 (0)