workaround multipart integration test using blocking receive inside netty thread

This commit is contained in:
Stephane Maldini
2018-03-30 15:42:23 -07:00
parent 6393e5ce0c
commit b8d32095a9

View File

@@ -103,11 +103,12 @@ public class MultipartIntegrationTests extends AbstractHttpHandlerIntegrationTes
assertEquals("fooPart", part.name());
assertTrue(part instanceof FilePart);
assertEquals("foo.txt", ((FilePart) part).filename());
DataBuffer buffer = DataBufferUtils.join(part.content()).block();
assertEquals(12, buffer.readableByteCount());
byte[] byteContent = new byte[12];
buffer.read(byteContent);
assertEquals("Lorem Ipsum.", new String(byteContent));
DataBufferUtils.join(part.content()).subscribe(buffer -> {
assertEquals(12, buffer.readableByteCount());
byte[] byteContent = new byte[12];
buffer.read(byteContent);
assertEquals("Lorem Ipsum.", new String(byteContent));
});
}
private void assertBarPart(Part part) {