Fix buffering issue in StringDecoder

Issue: SPR-17418
This commit is contained in:
Arjen Poutsma
2018-10-22 12:28:06 +02:00
parent 1c67ef4bed
commit f738273486
2 changed files with 5 additions and 2 deletions

View File

@@ -176,8 +176,9 @@ public class StringDecoderTests extends AbstractDataBufferAllocatingTestCase {
@Test
public void decodeError() {
DataBuffer fooBuffer = stringBuffer("foo\n");
DataBuffer barBuffer = stringBuffer("bar");
Flux<DataBuffer> source =
Flux.just(fooBuffer).concatWith(Flux.error(new RuntimeException()));
Flux.just(fooBuffer, barBuffer).concatWith(Flux.error(new RuntimeException()));
Flux<String> output = this.decoder.decode(source,
ResolvableType.forClass(String.class), null, Collections.emptyMap());