diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-08-30 17:40:17 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-30 17:40:17 +0600 |
commit | 77fb571511c987376d10b0b4045ef65d45a33e20 (patch) | |
tree | 60989f628daf7efd83706e780b291dd312a1febd | |
parent | 0eeb1f75e441ea8bd34d1ac6fda23727b1a908a5 (diff) | |
parent | c916d9663b1c480662efe2ace6877fc248e445fd (diff) | |
download | rspamd-77fb571511c987376d10b0b4045ef65d45a33e20.tar.gz rspamd-77fb571511c987376d10b0b4045ef65d45a33e20.zip |
Merge pull request #5114 from fatalbanana/robot_startup
[Test] Improve startup error handling
-rw-r--r-- | test/functional/lib/rspamd.robot | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/functional/lib/rspamd.robot b/test/functional/lib/rspamd.robot index c45a19908..de4e5285f 100644 --- a/test/functional/lib/rspamd.robot +++ b/test/functional/lib/rspamd.robot @@ -345,7 +345,22 @@ Run Rspamd Export Scoped Variables ${RSPAMD_SCOPE} RSPAMD_PROCESS=${result} # Confirm worker is reachable - Wait Until Keyword Succeeds 15x 1 sec Ping Rspamd ${RSPAMD_LOCAL_ADDR} ${check_port} + FOR ${index} IN RANGE 37 + ${ok} = Rspamd Startup Check ${check_port} + IF ${ok} CONTINUE + Sleep 0.4s + END + +Rspamd Startup Check + [Arguments] ${check_port}=${RSPAMD_PORT_NORMAL} + ${handle} = Get Process Object + ${res} = Evaluate $handle.poll() + IF ${res} != None + ${stderr} = Get File ${RSPAMD_TMPDIR}/rspamd.stderr + Fail Process Is Gone, stderr: ${stderr} + END + ${ping} = Run Keyword And Return Status Ping Rspamd ${RSPAMD_LOCAL_ADDR} ${check_port} + [Return] ${ping} Rspamadm Setup ${RSPAMADM_TMPDIR} = Make Temporary Directory |