Skip to content
代码片段 群组 项目
提交 c4862eca 编辑于 作者: Eric Ju's avatar Eric Ju
浏览文件

test: Add more time to spawn praefect

This commit adds a private method `process_details()` to print the
process status before terminating it. It is used to determine why
praefect is not ready for connectting.

We also added a longer timeout before dropping praefect connection.
上级 28b890c8
No related branches found
No related tags found
无相关合并请求
......@@ -152,6 +152,7 @@ def start(service, toml = nil)
begin
try_connect!(service, toml)
rescue StandardError
process_details(pid)
Process.kill('TERM', pid)
raise
end
......@@ -198,7 +199,7 @@ def connect_proc(toml)
def try_connect!(service, toml)
LOGGER.debug "Trying to connect to #{service}: "
timeout = 20
timeout = 40
delay = 0.1
connect = connect_proc(toml)
......@@ -407,4 +408,12 @@ def praefect_with_db?
def gitaly_with_transactions?
Gitlab::Utils.to_boolean(ENV['GITALY_TRANSACTIONS_ENABLED'], default: false)
end
private
# Logs the details of the process with the given pid.
def process_details(pid)
output = `ps -p #{pid} -o pid,ppid,state,%cpu,%mem,etime,args`
LOGGER.debug output
end
end
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册