From: Andrew Lewis Date: Thu, 21 Jul 2016 11:19:26 +0000 (+0100) Subject: [Test] Fix race conditions in functional tests X-Git-Tag: 1.3.0~29^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=23488b177f00e212e4f5e86dca1fb59c1f8a1c37;p=rspamd.git [Test] Fix race conditions in functional tests --- diff --git a/test/functional/lib/rspamd.robot b/test/functional/lib/rspamd.robot index 7bba2706c..35cf66648 100644 --- a/test/functional/lib/rspamd.robot +++ b/test/functional/lib/rspamd.robot @@ -79,6 +79,7 @@ Run Redis ${result} = Run Process redis-server ${TMPDIR}/redis-server.conf Run Keyword If ${result.rc} != 0 Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 + Wait Until Created ${TMPDIR}/redis.pid ${REDIS_PID} = Get File ${TMPDIR}/redis.pid Run Keyword If '${REDIS_SCOPE}' == 'Test' Set Test Variable ${REDIS_PID} ... ELSE IF '${REDIS_SCOPE}' == 'Suite' Set Suite Variable ${REDIS_PID} @@ -109,6 +110,7 @@ Run Rspamd Run Keyword If ${result.rc} != 0 Log ${result.stderr} ${rspamd_logpos} = Log Logs ${TMPDIR}/rspamd.log 0 Should Be Equal As Integers ${result.rc} 0 + Wait Until Created ${TMPDIR}/rspamd.pid ${rspamd_pid} = Get File ${TMPDIR}/rspamd.pid [Return] ${TMPDIR} ${rspamd_pid} ${rspamd_logpos}