From 973d719e695b96ee223e8e5e0fe2c574186b0002 Mon Sep 17 00:00:00 2001 From: Lorand Jakab Date: Tue, 19 Sep 2017 00:20:35 +0300 Subject: [PATCH] Convert Sleep to WUKS in lispflowmapping CSIT Part 1, 030_RPC_Datatypes.robot Change-Id: I6885a831f40ee2b1ff555de0f67b456ca6e9650e Signed-off-by: Lorand Jakab --- .../msmr/030_RPC_Datatypes.robot | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/csit/suites/lispflowmapping/msmr/030_RPC_Datatypes.robot b/csit/suites/lispflowmapping/msmr/030_RPC_Datatypes.robot index 41afb03551..4d02bbfca0 100644 --- a/csit/suites/lispflowmapping/msmr/030_RPC_Datatypes.robot +++ b/csit/suites/lispflowmapping/msmr/030_RPC_Datatypes.robot @@ -67,16 +67,17 @@ Check Datatype ${get_mapping}= Get LispAddress JSON And Wrap input ${get_mapping_eid} Set Suite Variable ${RPC_Datatype__current_json} ${get_mapping} Post Log Check ${LFM_RPC_API}:add-mapping ${add_mapping} - # TODO: Keyword to be rewritten to avoid `Sleep` using WUKS - Sleep 500ms Account for cluster propagation delay - ${resp}= Post Log Check ${LFM_RPC_API}:get-mapping ${get_mapping} - ${eid_record}= Get Eid Record ${resp} - Dictionary Should Contain Key ${eid_record} LocatorRecord + Wait Until Keyword Succeeds 5s 200ms Post Log Check LocatorRecord ${get_mapping} Remove Datatype And Check Removal Variable Should Exist ${RPC_Datatype__current_json} Post Log Check ${LFM_RPC_API}:remove-mapping ${RPC_Datatype__current_json} - # TODO: Keyword to be rewritten to avoid `Sleep` using WUKS - Sleep 500ms Account for cluster propagation delay - Check Mapping Removal ${RPC_Datatype__current_json} + Wait Until Keyword Succeeds 5s 200ms Check Mapping Removal ${RPC_Datatype__current_json} Set Suite Variable ${RPC_Datatype__current_json} ${EMPTY} + +Post Log Check LocatorRecord + [Arguments] ${get_mapping} + [Documentation] Extend the 'Post Log Check' keyword to check for the existence of a LocatorRecord + ${resp}= Post Log Check ${LFM_RPC_API}:get-mapping ${get_mapping} + ${eid_record}= Get Eid Record ${resp} + Dictionary Should Contain Key ${eid_record} LocatorRecord -- 2.36.6