X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Flibraries%2Fcontroller%2FCsCommon.robot;fp=csit%2Flibraries%2Fcontroller%2FCsCommon.robot;h=994ff5af621fa96959d5935383e63973a6480a4b;hb=271bc02ae44e984b091944fb89c1810bda19f992;hp=d984795da0d3278de9b87e12cc2e77224a32fd02;hpb=82ececb0e17a05fdf10e65ce5d56cc1c466e2b15;p=integration%2Ftest.git diff --git a/csit/libraries/controller/CsCommon.robot b/csit/libraries/controller/CsCommon.robot index d984795da0..994ff5af62 100644 --- a/csit/libraries/controller/CsCommon.robot +++ b/csit/libraries/controller/CsCommon.robot @@ -118,3 +118,21 @@ Rejoin_Node_And_Verify_Rejoined [Documentation] Rejoin isolated node. ClusterManagement.Rejoin_Member_From_List_Or_All ${cs_isolated_index} BuiltIn.Wait_Until_Keyword_Succeeds 5x 2s Verify_Singleton_Constant_On_Node ${cs_isolated_index} ${CS_CONSTANT_PREFIX}${cs_owner} + +Register_Flapping_Singleton_On_Nodes + [Arguments] ${index_list} + [Documentation] Register a candidate application on each node which starts the test. + : FOR ${index} IN @{index_list} + \ MdsalLowlevel.Register_Flapping_Singleton ${index} + +Unregister_Flapping_Singleton_On_Nodes_And_Validate_Results + [Arguments] ${index_list} ${rate_limit_to_pass} ${test_duration} + [Documentation] Unregister the testing service and check recevied statistics. + ${movements_count} = BuiltIn.Set_Variable ${0} + : FOR ${index} IN @{index_list} + \ ${count} = MdsalLowlevel.Unregister_Flapping_Singleton ${index} + \ BuiltIn.Run_Keyword_If ${count} < 0 BuiltIn.Fail No failure should have occured during the ${test_duration} timeout. + \ ${movements_count} = BuiltIn.Evaluate ${movements_count}+${count} + ${seconds} = DateTime.Convert_Time ${test_duration} + ${rate} = BuiltIn.Evaluate ${movements_count}/${seconds} + BuiltIn.Run_Keyword_If ${rate} < ${rate_limit_to_pass} BuiltIn.Fail Acceptance rate ${rate_limit_to_pass} not reached, actual rate is ${rate}.