Modifying openflow switch scale test to gracefully handle failures (mininet timeouts)
authorKailash Khalasi <kkhalasi@iix.net>
Mon, 24 Aug 2015 22:50:10 +0000 (15:50 -0700)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 25 Aug 2015 17:39:49 +0000 (17:39 +0000)
Change-Id: Ida1e98573a82bf076c3e77c345f840d31f09b562
Signed-off-by: Kailash Khalasi <kkhalasi@iix.net>
test/csit/libraries/Scalability.robot

index 5344fc5c9be355024c65146a15c30a62818c99cc..5d81ebed72d66dd47eba249a6dae826145ef0ac7 100644 (file)
@@ -12,11 +12,13 @@ Find Max Switches
     [Arguments]    ${start}    ${stop}    ${step}
     [Documentation]    Will find out max switches starting from ${start} till reaching ${stop} and in steps defined by ${step}
     ${max-switches}    Set Variable    ${0}
+    Set Suite Variable    ${max-switches}
     ${start}    Convert to Integer    ${start}
     ${stop}    Convert to Integer    ${stop}
     ${step}    Convert to Integer    ${step}
     : FOR    ${switches}    IN RANGE    ${start}    ${stop+1}    ${step}
-    \    Start Mininet Linear    ${switches}
+    \    ${status}    ${result}    Run Keyword And Ignore Error    Start Mininet Linear    ${switches}
+    \    Exit For Loop If    '${status}' == 'FAIL'
     \    ${status}    ${result}    Run Keyword And Ignore Error    Verify Controller Is Not Dead    ${CONTROLLER}
     \    Exit For Loop If    '${status}' == 'FAIL'
     \    ${status}    ${result}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    ${switches*2}    10s
@@ -25,7 +27,8 @@ Find Max Switches
     \    ${status}    ${result}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    ${switches*2}    10s
     \    ...    Check Linear Topology    ${switches}
     \    Exit For Loop If    '${status}' == 'FAIL'
-    \    Stop Mininet Simulation
+    \    ${status}    ${result}    Run Keyword And Ignore Error    Stop Mininet Simulation
+    \    Exit For Loop If    '${status}' == 'FAIL'
     \    ${status}    ${result}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    ${switches*2}    10s
     \    ...    Check No Switches    ${switches}
     \    Exit For Loop If    '${status}' == 'FAIL'