Prepare for Sinks API updates in Reactor

See reactor/reactor-core#2374
All usages of this API are in tests, which are not checking overflow or
concurrent emissions - so a simple replacement with `try***` equivalents
is fine.
This commit is contained in:
Brian Clozel
2020-09-11 16:34:31 +02:00
parent af3dc5d440
commit b2a0978c12
8 changed files with 37 additions and 37 deletions

View File

@@ -209,7 +209,7 @@ public class MultipartHttpMessageWriterTests extends AbstractLeakCheckingTests {
public void singleSubscriberWithResource() throws IOException {
Sinks.Many<Resource> sink = Sinks.many().unicast().onBackpressureBuffer();
Resource logo = new ClassPathResource("/org/springframework/http/converter/logo.jpg");
sink.emitNext(logo);
sink.tryEmitNext(logo);
MultipartBodyBuilder bodyBuilder = new MultipartBodyBuilder();
bodyBuilder.asyncPart("logo", sink.asFlux(), Resource.class);