Skip to content

Commit 49c2a11

Browse files
committed
Permit keep alive for testing grpc proxy
1 parent 2ede146 commit 49c2a11

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import java.io.IOException;
55
import java.io.InputStream;
66
import java.net.InetAddress;
7+
import java.util.concurrent.TimeUnit;
78
import java.util.concurrent.locks.Lock;
89
import java.util.concurrent.locks.ReentrantLock;
910

@@ -40,6 +41,8 @@ public class GrpcProxyServer implements AutoCloseable {
4041
public GrpcProxyServer(ManagedChannel target, int port) {
4142
this.target = target;
4243
this.server = Grpc.newServerBuilderForPort(port, InsecureServerCredentials.create())
44+
.permitKeepAliveTime(10, TimeUnit.SECONDS)
45+
.permitKeepAliveWithoutCalls(true)
4346
.fallbackHandlerRegistry(new ProxyRegistry())
4447
.build();
4548
try {

0 commit comments

Comments
 (0)