fix running tests with custom clickhouse-client [#CLICKHOUSE-2]

This commit is contained in:
Alexey Zatelepin 2017-08-31 23:03:47 +03:00 committed by alexey-milovidov
parent d2847f22af
commit 392b59a2fe

View File

@ -8,6 +8,7 @@ import lxml.etree as et
from argparse import ArgumentParser
from argparse import FileType
from pprint import pprint
import shlex
import subprocess
from subprocess import check_call
from subprocess import Popen
@ -34,7 +35,7 @@ def main(args):
def is_data_present():
proc = Popen(args.client, stdin=PIPE, stdout=PIPE, stderr=PIPE)
proc = Popen(shlex.split(args.client), stdin=PIPE, stdout=PIPE, stderr=PIPE)
(stdout, stderr) = proc.communicate("EXISTS TABLE test.hits")
if proc.returncode != 0:
raise CalledProcessError(proc.returncode, args.client, stderr)