SXP: Fix WUKS KW usage 70/77770/5
authorIvan Hrasko <ihrasko@cisco.com>
Wed, 14 Nov 2018 09:21:32 +0000 (10:21 +0100)
committerIvan Hrasko <ihrasko@cisco.com>
Wed, 14 Nov 2018 09:57:44 +0000 (09:57 +0000)
- BuiltIn.Wait Until Keyword Seceeds KW is used in wrong
way in some places

- the first argument should be number of retries
- the second argument should be retry interval
- it has no sense to retry 1x

Change-Id: I326b4fbb7bab42e844642c5765ecf078c03f00c1
Signed-off-by: Ivan Hrasko <ihrasko@cisco.com>
csit/libraries/SxpClusterLib.robot
csit/suites/sxp/clustering/040_RPC_Redirecting.robot

index 36a069f8e8a50fe97d98536898fb4e4407f6222b..f88e2116a0c73520987abcbd3a5dddad1f6738f9 100644 (file)
@@ -58,9 +58,9 @@ Setup SXP Cluster
     ${cluster_mode} =    Sxp.Get Opposing Mode    ${peer_mode}
     SxpLib.Add Node    ${INADDR_ANY}    session=${CONTROLLER_SESSION}
     SxpLib.Add Connection    version4    ${cluster_mode}    ${DEVICE_NODE_ID}    64999    ${INADDR_ANY}    session=${CONTROLLER_SESSION}
-    BuiltIn.Wait Until Keyword Succeeds    1m    1x    SxpLib.Check Node Started    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}
-    BuiltIn.Wait Until Keyword Succeeds    1m    1x    Check Cluster Node started    ${INADDR_ANY}    ip=${EMPTY}
-    BuiltIn.Wait Until Keyword Succeeds    4m    1x    Check Device is Connected    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}
+    BuiltIn.Wait Until Keyword Succeeds    12x    10s    SxpLib.Check Node Started    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}
+    BuiltIn.Wait Until Keyword Succeeds    12x    10s    Check Cluster Node started    ${INADDR_ANY}    ip=${EMPTY}
+    BuiltIn.Wait Until Keyword Succeeds    48x    10s    Check Device is Connected    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}
 
 Clean SXP Cluster
     [Documentation]    Disconnect SXP cluster topology
index 6c9344f348ecbd9705fd7a99bf0a36b6c8bfc1ab..2470eb392f8f31ad47127b18085d47ab023c1014 100644 (file)
@@ -13,9 +13,9 @@ Test Add/Delete Node
     [Documentation]    Adding and then deleting SXP node is sucessfull only if all operations are done on cluster owner node. To verify that all RPCs are redirected to cluster owner send add-node RPC to the first cluster node and delete-node RPC to the second cluster node (requires datastore access).
     [Tags]    SXP Clustering Redirecting
     SxpLib.Add Node    ${INADDR_ANY}    session=ClusterManagement__session_1
-    BuiltIn.Wait Until Keyword Succeeds    1m    1x    SxpClusterLib.Check Cluster Node started    ${INADDR_ANY}    ip=${EMPTY}
+    BuiltIn.Wait Until Keyword Succeeds    12x    10s    SxpClusterLib.Check Cluster Node started    ${INADDR_ANY}    ip=${EMPTY}
     SxpLib.Delete Node    ${INADDR_ANY}    session=ClusterManagement__session_2
-    BuiltIn.Wait Until Keyword Succeeds    1m    1x    SxpClusterLib.Check Cluster Node stopped    ${INADDR_ANY}    ip=${EMPTY}
+    BuiltIn.Wait Until Keyword Succeeds    12x    10s    SxpClusterLib.Check Cluster Node stopped    ${INADDR_ANY}    ip=${EMPTY}
 
 Test Add/Delete Binding
     [Documentation]    Adding and then deleting binding from a SXP node is sucessfull only if all operations are done on cluster owner node. To verify that all RPCs are redirected to cluster owner send add-node RPC to the first cluster node, add-bindings RPC to the second cluster node (requires master database) and delete-bindings RPC to the third cluster node (requires master database).
@@ -92,9 +92,9 @@ Test Add/Update/Delete Binding Origin
 Add Node And Check It Is Started
     [Documentation]    Send add-node RPC to the first cluster member and check if node has been started.
     SxpLib.Add Node    ${INADDR_ANY}    session=ClusterManagement__session_1
-    BuiltIn.Wait Until Keyword Succeeds    1m    1x    SxpClusterLib.Check Cluster Node started    ${INADDR_ANY}    ip=${EMPTY}
+    BuiltIn.Wait Until Keyword Succeeds    12x    10s    SxpClusterLib.Check Cluster Node started    ${INADDR_ANY}    ip=${EMPTY}
 
 Delete Node And Check It Is Stopped
     [Documentation]    Send delete-node RPC to the first cluster member and check if node has been stopped.
     SxpLib.Delete Node    ${INADDR_ANY}    session=ClusterManagement__session_1
-    BuiltIn.Wait Until Keyword Succeeds    1m    1x    SxpClusterLib.Check Cluster Node stopped    ${INADDR_ANY}    ip=${EMPTY}
+    BuiltIn.Wait Until Keyword Succeeds    12x    10s    SxpClusterLib.Check Cluster Node stopped    ${INADDR_ANY}    ip=${EMPTY}