Fix deprecations from Reactor
This commit is contained in:
@@ -112,7 +112,7 @@ public class RSocketDslTests {
|
||||
return IntegrationFlows
|
||||
.from(RSockets.inboundGateway("/uppercase")
|
||||
.interactionModels(RSocketInteractionModel.requestChannel))
|
||||
.<Flux<String>, Flux<String>>transform((flux) -> flux.map(String::toUpperCase))
|
||||
.<Flux<String>>handle((payload, headers) -> payload.map(String::toUpperCase), e -> e.async(true))
|
||||
.get();
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ import io.rsocket.transport.netty.server.CloseableChannel;
|
||||
import io.rsocket.transport.netty.server.TcpServerTransport;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
import reactor.core.publisher.MonoProcessor;
|
||||
import reactor.core.publisher.Sinks;
|
||||
import reactor.test.StepVerifier;
|
||||
|
||||
/**
|
||||
@@ -93,7 +93,7 @@ public class RSocketInboundGatewayIntegrationTests {
|
||||
@BeforeEach
|
||||
void setupTest(TestInfo testInfo) {
|
||||
if (testInfo.getDisplayName().startsWith("server")) {
|
||||
this.serverRsocketRequester = serverConfig.clientRequester.block(Duration.ofSeconds(10));
|
||||
this.serverRsocketRequester = serverConfig.clientRequester.asMono().block(Duration.ofSeconds(10));
|
||||
}
|
||||
else {
|
||||
this.clientRsocketRequester =
|
||||
@@ -181,7 +181,7 @@ public class RSocketInboundGatewayIntegrationTests {
|
||||
@EnableIntegration
|
||||
static class ServerConfig extends CommonConfig {
|
||||
|
||||
final MonoProcessor<RSocketRequester> clientRequester = MonoProcessor.create();
|
||||
final Sinks.StandaloneMonoSink<RSocketRequester> clientRequester = Sinks.promise();
|
||||
|
||||
@Bean
|
||||
public CloseableChannel rsocketServer() {
|
||||
@@ -204,7 +204,7 @@ public class RSocketInboundGatewayIntegrationTests {
|
||||
|
||||
@EventListener
|
||||
public void onApplicationEvent(RSocketConnectedEvent event) {
|
||||
this.clientRequester.onNext(event.getRequester());
|
||||
this.clientRequester.success(event.getRequester());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -66,8 +66,7 @@ import io.rsocket.transport.netty.server.TcpServerTransport;
|
||||
import reactor.core.Disposable;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
import reactor.core.publisher.MonoProcessor;
|
||||
import reactor.core.publisher.ReplayProcessor;
|
||||
import reactor.core.publisher.Sinks;
|
||||
import reactor.test.StepVerifier;
|
||||
|
||||
/**
|
||||
@@ -133,7 +132,7 @@ public class RSocketOutboundGatewayIntegrationTests {
|
||||
@BeforeEach
|
||||
void setupTest(TestInfo testInfo) {
|
||||
if (testInfo.getDisplayName().startsWith("server")) {
|
||||
this.serverRsocketRequester = serverController.clientRequester.block(Duration.ofSeconds(10));
|
||||
this.serverRsocketRequester = serverController.clientRequester.asMono().block(Duration.ofSeconds(10));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +157,7 @@ public class RSocketOutboundGatewayIntegrationTests {
|
||||
.setHeader(RSocketRequesterMethodArgumentResolver.RSOCKET_REQUESTER_HEADER, rsocketRequester)
|
||||
.build());
|
||||
|
||||
StepVerifier.create(controller.fireForgetPayloads)
|
||||
StepVerifier.create(controller.fireForgetPayloads.asFlux())
|
||||
.expectNext("Hello")
|
||||
.thenCancel()
|
||||
.verify();
|
||||
@@ -537,13 +536,13 @@ public class RSocketOutboundGatewayIntegrationTests {
|
||||
@Controller
|
||||
static class TestController {
|
||||
|
||||
final ReplayProcessor<String> fireForgetPayloads = ReplayProcessor.create();
|
||||
final Sinks.StandaloneFluxSink<String> fireForgetPayloads = Sinks.replayAll();
|
||||
|
||||
final MonoProcessor<RSocketRequester> clientRequester = MonoProcessor.create();
|
||||
final Sinks.StandaloneMonoSink<RSocketRequester> clientRequester = Sinks.promise();
|
||||
|
||||
@MessageMapping("receive")
|
||||
void receive(String payload) {
|
||||
this.fireForgetPayloads.onNext(payload);
|
||||
this.fireForgetPayloads.next(payload);
|
||||
}
|
||||
|
||||
@MessageMapping("echo")
|
||||
@@ -595,7 +594,7 @@ public class RSocketOutboundGatewayIntegrationTests {
|
||||
|
||||
@ConnectMapping("clientConnect")
|
||||
void clientConnect(RSocketRequester requester) {
|
||||
this.clientRequester.onNext(requester);
|
||||
this.clientRequester.success(requester);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user