Fix test case: Cases.210 Clickhouse.001tags/1.8.2
@@ -94,7 +94,7 @@ pipeline: | |||
# use umask to create world-writable files so nobody can write to *.gcda files created by root | |||
- umask 0000 | |||
- set +e | |||
- RSPAMD_INSTALLROOT=/rspamd/install robot --exclude isbroken $CI_WORKSPACE/test/functional/cases; EXIT_CODE=$? | |||
- RSPAMD_INSTALLROOT=/rspamd/install robot --removekeywords wuks --exclude isbroken $CI_WORKSPACE/test/functional/cases; EXIT_CODE=$? | |||
- set -e | |||
# upload test results to nginx frontent using WebDAV PUT | |||
- > |
@@ -11,6 +11,7 @@ Test Teardown Clickhosue Teardown | |||
*** Variables *** | |||
${CONFIG} ${TESTDIR}/configs/clickhouse.conf | |||
${RSPAMD_SCOPE} Suite | |||
${CLICKHOUSE_PORT} ${18123} | |||
*** Test Cases *** | |||
Initial schema | |||
@@ -68,7 +69,7 @@ Clickhouse Setup | |||
${result} = Run Process clickhouse-server --daemon --config-file\=${TMPDIR}/clickhouse-config.xml --pid-file\=${TMPDIR}/clickhouse.pid | |||
Run Keyword If ${result.rc} != 0 Log ${result.stderr} | |||
Should Be Equal As Integers ${result.rc} 0 | |||
Wait Until Keyword Succeeds 5 sec 1 sec Check Pidfile ${TMPDIR}/clickhouse.pid timeout=5 sec | |||
Wait Until Keyword Succeeds 5 sec 50 ms TCP Connect localhost ${CLICKHOUSE_PORT} | |||
Set Suite Variable ${TMPDIR} ${TMPDIR} | |||
@@ -8,7 +8,7 @@ __client = None | |||
class Client: | |||
def __init__(self): | |||
self.port = 18123 | |||
self.port = BuiltIn().get_variable_value('${CLICKHOUSE_PORT}', default=18123) | |||
def get_query_string(self): | |||
return "http://localhost:%d/?default_format=JSONEachRow" % (self.port) |
@@ -10,7 +10,7 @@ | |||
<!-- <console>1</console> --> <!-- Default behavior is autodetection (log to console if not daemon mode and is tty) --> | |||
</logger> | |||
<!--display_name>production</display_name--> <!-- It is the name that will be shown in the client --> | |||
<http_port>18123</http_port> | |||
<http_port>${CLICKHOUSE_PORT}</http_port> | |||
<tcp_port>19000</tcp_port> | |||
<!-- For HTTPS and SSL over native protocol. --> |
@@ -160,8 +160,15 @@ def spamc(addr, port, filename): | |||
return r.decode('utf-8') | |||
def TCP_Connect(addr, port): | |||
"""Attempts to open a TCP connection to specified address:port | |||
Example: | |||
| Wait Until Keyword Succeeds | 5s | 10ms | TCP Connect | localhost | 8080 | | |||
""" | |||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |||
s.settimeout(5) # seconds | |||
s.connect((addr, port)) | |||
s.close() | |||
def update_dictionary(a, b): | |||
a.update(b) |