]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Fix race in Cases.210 Clickhouse.001
authorAnton Yuzhaninov <citrin+git@citrin.ru>
Thu, 25 Oct 2018 00:10:14 +0000 (20:10 -0400)
committerAnton Yuzhaninov <citrin+git@citrin.ru>
Thu, 25 Oct 2018 00:10:14 +0000 (20:10 -0400)
Clickhouse test sometimes fails with an error:
ConnectionError: HTTPConnectionPool(host='localhost', port=18123): Max retries exceeded with url: /?default_format=JSONEachRow (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f40ad96fdd0>: Failed to establish a new connection: [Errno 111] Connection refused',))

Fix this by waiting for TCP port instead pid file.

test/functional/cases/210_clickhouse/001_migration.robot

index f54f5c4a289d7378c4fabd1b8da22a6c1019ebf5..bf6d480847fdebc99c947d586e922fa84a6e7242 100644 (file)
@@ -69,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}