Skip to content

Commit 4db92cb

Browse files
committed
Fixed timeout calculation
1 parent f1503ed commit 4db92cb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ydb/tests/tools/kqprun/recipe/__main__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
PID_FILENAME = "kqprun_daemon.pid"
1212
KQPRUN_PATH = os.getenv("KQPRUN_EXECUTABLE") or "ydb/tests/tools/kqprun/kqprun"
13+
INITIALIZATION_IMEOUT_RATIO = 2
1314

1415

1516
def is_kqprun_daemon_ready() -> bool:
@@ -40,22 +41,22 @@ def build_start_comand(argv: list[str], grpc_port: int) -> tuple[int, list[str]]
4041
cmd.append("--script-query")
4142
cmd.append(yatest_common.source_path(query))
4243

43-
return (parsed.timeout_ms // 500, cmd)
44+
return (parsed.timeout_ms, cmd)
4445

4546

4647
def start(argv: list[str]):
4748
logging.debug("Starting kqprun daemon")
4849

4950
portManager = PortManager()
5051
grpc_port = portManager.get_port()
51-
timeout, cmd = build_start_comand(argv, grpc_port)
52+
timeout_ms, cmd = build_start_comand(argv, grpc_port)
5253

5354
recipes_common.start_daemon(
5455
command=cmd,
5556
environment=None,
5657
is_alive_check=is_kqprun_daemon_ready,
5758
pid_file_name=PID_FILENAME,
58-
timeout=timeout,
59+
timeout=INITIALIZATION_IMEOUT_RATIO * (timeout_ms // 1000),
5960
daemon_name="kqprun_daemon"
6061
)
6162

0 commit comments

Comments
 (0)