Merge pull request #8063 from Akazz/tests/better_server_pid_detection

Improved getting ClickHouse server pid in clickhouse-test
This commit is contained in:
Nikolai Kochetov 2019-12-06 16:26:47 +03:00 committed by GitHub
commit a73975d6a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,7 +107,7 @@ def get_stacktraces(server_pid):
def get_server_pid(server_tcp_port):
cmd = "lsof -i tcp:{port} | grep '*:{port}'".format(port=server_tcp_port)
cmd = "lsof -i tcp:{port} | fgrep 'TCP *:{port} (LISTEN)'".format(port=server_tcp_port)
try:
output = subprocess.check_output(cmd, shell=True)
if output: