From: Anton Yuzhaninov Date: Thu, 25 Oct 2018 00:10:14 +0000 (-0400) Subject: Fix race in Cases.210 Clickhouse.001 X-Git-Tag: 1.8.2~142^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ed06f8104c52bb1f3f3fa491dd01102f2aece10;p=thirdparty%2Frspamd.git Fix race in Cases.210 Clickhouse.001 Clickhouse test sometimes fails with an error: ConnectionError: HTTPConnectionPool(host='localhost', port=18123): Max retries exceeded with url: /?default_format=JSONEachRow (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',)) Fix this by waiting for TCP port instead pid file. --- diff --git a/test/functional/cases/210_clickhouse/001_migration.robot b/test/functional/cases/210_clickhouse/001_migration.robot index f54f5c4a28..bf6d480847 100644 --- a/test/functional/cases/210_clickhouse/001_migration.robot +++ b/test/functional/cases/210_clickhouse/001_migration.robot @@ -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}