diff options
author | Andrew Lewis <nerf@judo.za.org> | 2016-10-14 15:39:34 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2016-10-14 15:39:34 +0200 |
commit | e9175690796f8c7b0270be833180589056f57e21 (patch) | |
tree | b49ac67cddb6bd910769246fbe290c4226ac4751 /test | |
parent | 50ef6c716150437a4246aab03d74402dc1cd3cd9 (diff) | |
download | rspamd-e9175690796f8c7b0270be833180589056f57e21.tar.gz rspamd-e9175690796f8c7b0270be833180589056f57e21.zip |
[Test] Wait until size of PIDfiles is > 0
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/lib/rspamd.robot | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/functional/lib/rspamd.robot b/test/functional/lib/rspamd.robot index 18e4f91eb..acb6c7e74 100644 --- a/test/functional/lib/rspamd.robot +++ b/test/functional/lib/rspamd.robot @@ -4,6 +4,12 @@ Library OperatingSystem Library Process *** Keywords *** +Check Pidfile + [Arguments] ${pidfile} + Wait Until Created ${pidfile} + ${size} = Get File Size ${pidfile} + Should Not Be Equal As Integers ${size} 0 + Check Rspamc [Arguments] ${result} @{args} &{kwargs} Follow Rspamd Log @@ -81,7 +87,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 + Wait Until Keyword Succeeds 30 sec 1 sec Check Pidfile ${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} @@ -113,7 +119,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 + Wait Until Keyword Succeeds 30 sec 1 sec Check Pidfile ${tmpdir}/rspamd.pid ${rspamd_pid} = Get File ${tmpdir}/rspamd.pid Set To Dictionary ${d} RSPAMD_LOGPOS=${rspamd_logpos} RSPAMD_PID=${rspamd_pid} TMPDIR=${tmpdir} [Return] &{d} |