提交 9462f568 编写于 作者: P proller 提交者: GitHub

Fix external http test: move server start from run.sh to generate_and_test.py (#409)

* Fix external http test: move server start from run.sh to generate_and_test.py

* fix
上级 de9bc1dc
......@@ -31,6 +31,8 @@ MSG_SKIPPED = OP_SQUARE_BRACKET + colored(" SKIPPED ", "cyan", attrs=['bold']) +
#Not complete disable
use_mysql = True
use_mongo = True
use_http = True
http_port = 58000
wait_for_loading_sleep_time_sec = 3
......@@ -307,10 +309,10 @@ def generate_dictionaries(args):
source_http = '''
<http>
<url>http://localhost:58001/generated/%s</url>
<url>http://localhost:{http_port}/generated/%s</url>
<format>TabSeparated</format>
</http>
'''
'''.format(http_port=http_port)
layout_flat = '<flat />'
layout_hashed = '<hashed />'
......@@ -421,6 +423,8 @@ def generate_dictionaries(args):
def run_tests(args):
if use_http:
http_server = subprocess.Popen(["python", "http_server.py", str(http_port)]);
keys = [ 'toUInt64(n)', '(n, n)', '(toString(n), n)' ]
dict_get_query_skeleton = "select dictGet{type}('{name}', '{type}_', {key}) from system.one array join range(8) as n;"
dict_has_query_skeleton = "select dictHas('{name}', {key}) from system.one array join range(8) as n;"
......@@ -559,6 +563,9 @@ def run_tests(args):
dict_hierarchy_query_skeleton.format(**locals()),
'hierarchy', ' for dictGetHierarchy, dictIsIn')
if use_http:
http_server.kill()
if failures > 0:
print(colored("\nHaving {0} errors!".format(failures), "red", attrs=["bold"]))
sys.exit(1)
......
......@@ -81,9 +81,6 @@ else
echo 'MongoDB already started'
fi
python http_server.py 58001 &
http_pid=$!
# ClickHouse
clickhouse-server &> clickhouse.log &
sleep 3
......@@ -101,5 +98,3 @@ fi
kill -SIGTERM $PID
#wait $PID
echo 'Stopped ClickHouse server'
kill $http_pid
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册