From: Jozef Behran Date: Tue, 23 Feb 2016 09:07:21 +0000 (+0100) Subject: Add test case to wait for MDSAL to become ready X-Git-Tag: release/beryllium-sr1~54 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=integration%2Ftest.git;a=commitdiff_plain;h=1b4d2498a744a15a7962f51c3d816c3fbcad61e8 Add test case to wait for MDSAL to become ready The Netconf Readiness suite got another testcase which waits for the Netconf MD-SAL to become ready. This testcase first checks if that feature is installed and skips with a message if not. Change-Id: If763e6fba6639536bb5360dcd6fcc4ce922261e7 Signed-off-by: Jozef Behran --- diff --git a/csit/suites/netconf/ready/netconfready.robot b/csit/suites/netconf/ready/netconfready.robot index d3c4f79978..a6ee539764 100644 --- a/csit/suites/netconf/ready/netconfready.robot +++ b/csit/suites/netconf/ready/netconfready.robot @@ -50,6 +50,7 @@ ${netconf_is_ready} False ${NETCONFREADY_WAIT} 60s ${USE_NETCONF_CONNECTOR} True ${DEBUG_LOGGING_FOR_EVERYTHING} False +${NETCONFREADY_WAIT_MDSAL} 60s *** Test Cases *** Check_Whether_Netconf_Is_Up_And_Running @@ -87,6 +88,15 @@ Check_Whether_Netconf_Can_Pretty_Print BuiltIn.Run_Keyword_Unless ${netconf_is_ready} Fail Netconf is not ready so it can't pretty-print now. Check_Netconf_Up_And_Running ?prettyPrint=true +Wait_For_MDSAL + [Documentation] Wait for the MDSAL feature to become online + ${status} ${message}= BuiltIn.Run_Keyword_And_Ignore_Error KarafKeywords.Verify_Feature_Is_Installed odl-netconf-mdsal + BuiltIn.Run_Keyword_If '${status}' == 'FAIL' BuiltIn.Pass_Execution The 'odl-netconf-mdsal' feature is not installed so no need to wait for it. + SSHKeywords.Open_Connection_To_ODL_System + BuiltIn.Wait_Until_Keyword_Succeeds ${NETCONFREADY_WAIT_MDSAL} 1s Check_Netconf_MDSAL_Up_And_Running + SSHLibrary.Close_Connection + [Teardown] Utils.Report_Failure_Due_To_Bug 4583 + *** Keywords *** Setup_Everything [Documentation] Setup requests library and log into karaf.log that the netconf readiness wait starts. @@ -114,3 +124,7 @@ Check_Netconf_Usable NetconfKeywords.Configure_Device_In_Netconf test-device device_type=configure-via-topology NetconfKeywords.Remove_Device_From_Netconf test-device Check_Netconf_Up_And_Running + +Check_Netconf_MDSAL_Up_And_Running + ${count}= SSHKeywords.Count_Port_Occurences ${ODL_NETCONF_MDSAL_PORT} LISTEN java + BuiltIn.Should_Be_Equal_As_Integers ${count} 1