workaround multipart integration test using blocking receive inside netty thread
This commit is contained in:
@@ -103,11 +103,12 @@ public class MultipartIntegrationTests extends AbstractHttpHandlerIntegrationTes
|
|||||||
assertEquals("fooPart", part.name());
|
assertEquals("fooPart", part.name());
|
||||||
assertTrue(part instanceof FilePart);
|
assertTrue(part instanceof FilePart);
|
||||||
assertEquals("foo.txt", ((FilePart) part).filename());
|
assertEquals("foo.txt", ((FilePart) part).filename());
|
||||||
DataBuffer buffer = DataBufferUtils.join(part.content()).block();
|
DataBufferUtils.join(part.content()).subscribe(buffer -> {
|
||||||
assertEquals(12, buffer.readableByteCount());
|
assertEquals(12, buffer.readableByteCount());
|
||||||
byte[] byteContent = new byte[12];
|
byte[] byteContent = new byte[12];
|
||||||
buffer.read(byteContent);
|
buffer.read(byteContent);
|
||||||
assertEquals("Lorem Ipsum.", new String(byteContent));
|
assertEquals("Lorem Ipsum.", new String(byteContent));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void assertBarPart(Part part) {
|
private void assertBarPart(Part part) {
|
||||||
|
|||||||
Reference in New Issue
Block a user