From 73eda35d3fcc1c67605b1c71f6c98e91bf216906 Mon Sep 17 00:00:00 2001 From: Luca Giovenzana Date: Sat, 22 Aug 2020 00:22:05 +0200 Subject: [PATCH] Removed sleep and replaced with 'Wait Until Http Server Is Up And Running' Conflicts: atests/res_setup.robot --- atests/res_setup.robot | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/atests/res_setup.robot b/atests/res_setup.robot index b172ad38..3ea908ab 100644 --- a/atests/res_setup.robot +++ b/atests/res_setup.robot @@ -9,14 +9,27 @@ ${HTTP_LOCAL_SERVER} http://localhost:5000 *** Keywords *** + +Setup Test Session + ${test_session}= Set Variable test_session + Set Test Variable ${test_session} + Create Session ${test_session} ${HTTP_LOCAL_SERVER} + +Teardown Test Session + Delete All Sessions + Setup Flask Http Server ${platform}= Evaluate sys.platform sys ${flask_cmd} = Set Variable If ... '${platform}'=='win32' ${CURDIR}/http_server/run.cmd ... ${CURDIR}/http_server/run.sh Start Process ${flask_cmd} cwd=${CURDIR}/http_server/ alias=flask - Sleep 1 # I know... needed to let the http server start before starting the connection Create Session ${GLOBAL_LOCAL_SESSION} ${HTTP_LOCAL_SERVER} + Wait Until Http Server Is Up And Running + +Wait Until Http Server Is Up And Running + Create Session wait-until-up ${HTTP_LOCAL_SERVER} max_retries=10 + Get Request wait-until-up / Teardown Flask Http Server And Sessions Delete All Sessions