Fix server termination
This commit is contained in:
@@ -82,8 +82,8 @@ class GrpcServer implements SmartLifecycle {
|
|||||||
@Override
|
@Override
|
||||||
public void stop() {
|
public void stop() {
|
||||||
logger.info("Shutting down gRPC server");
|
logger.info("Shutting down gRPC server");
|
||||||
this.server.shutdown();
|
this.server.shutdownNow();
|
||||||
this.executor.shutdown();
|
this.executor.shutdownNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ public class GrpcInteractionTests {
|
|||||||
Flux<Message<byte[]>> clientResponseObserver =
|
Flux<Message<byte[]>> clientResponseObserver =
|
||||||
GrpcUtils.biStreaming("localhost", port, Flux.fromIterable(messages));
|
GrpcUtils.biStreaming("localhost", port, Flux.fromIterable(messages));
|
||||||
|
|
||||||
List<Message<byte[]>> results = clientResponseObserver.collectList().block(Duration.ofSeconds(100));
|
List<Message<byte[]>> results = clientResponseObserver.collectList().block(Duration.ofSeconds(10));
|
||||||
assertThat(results.size()).isEqualTo(3);
|
assertThat(results.size()).isEqualTo(3);
|
||||||
assertThat(results.get(0).getPayload()).isEqualTo("\"RICKY\"".getBytes());
|
assertThat(results.get(0).getPayload()).isEqualTo("\"RICKY\"".getBytes());
|
||||||
assertThat(results.get(1).getPayload()).isEqualTo("\"JULIEN\"".getBytes());
|
assertThat(results.get(1).getPayload()).isEqualTo("\"JULIEN\"".getBytes());
|
||||||
|
|||||||
Reference in New Issue
Block a user