Skip to content

Commit a0a7634

Browse files
committed
Fixed proxy server closing
1 parent 49c2a11 commit a0a7634

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

tests/common/src/main/java/tech/ydb/test/integration/docker/GrpcProxyServer.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ public EndpointRecord endpoint() {
6262
@Override
6363
public void close() {
6464
server.shutdown();
65+
try {
66+
server.awaitTermination(60, TimeUnit.SECONDS);
67+
} catch (InterruptedException ex) {
68+
logger.error("cannot await proxy server closing", ex);
69+
Thread.currentThread().interrupt();
70+
}
6571
}
6672

6773
private static class CallProxy<ReqT, RespT> {

tests/common/src/main/java/tech/ydb/test/integration/docker/ProxedDockerHelperFactory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package tech.ydb.test.integration.docker;
22

33

4+
45
import io.grpc.Grpc;
56
import io.grpc.InsecureChannelCredentials;
67
import io.grpc.ManagedChannel;
@@ -75,6 +76,7 @@ public byte[] pemCert() {
7576
@Override
7677
public void close() {
7778
server.close();
79+
channel.shutdownNow();
7880

7981
if (env.dockerReuse() && TestcontainersConfiguration.getInstance().environmentSupportsReuse()) {
8082
return;

0 commit comments

Comments
 (0)