Use ephemeral ports for RSocket tests

Closes gh-23325
pull/23445/head
Phillip Webb 4 years ago
parent 195def0ec3
commit bd87ba33d0

@ -83,7 +83,9 @@ class NettyRSocketServerFactoryTests {
}
private NettyRSocketServerFactory getFactory() {
return new NettyRSocketServerFactory();
NettyRSocketServerFactory factory = new NettyRSocketServerFactory();
factory.setPort(0);
return factory;
}
@Test
@ -189,10 +191,12 @@ class NettyRSocketServerFactoryTests {
@Override
public Mono<RSocket> accept(ConnectionSetupPayload setupPayload, RSocket rSocket) {
return Mono.just(new AbstractRSocket() {
@Override
public Mono<Payload> requestResponse(Payload payload) {
return Mono.just(DefaultPayload.create(payload));
}
});
}

Loading…
Cancel
Save