Add verify shards after isolated node rejoin
[integration/test.git] / csit / libraries / controller / CsCommon.robot
index b1aac0936d74646c49837d961f3f912ea2b8e3ad..71542455ac198f306b9a04b08efc6200056ffc72 100644 (file)
@@ -22,6 +22,7 @@ Documentation     Cluster Singleton testing: Common Keywords
 Library           Collections
 Resource          ${CURDIR}/../ClusterManagement.robot
 Resource          ${CURDIR}/../MdsalLowlevel.robot
+Resource          ${CURDIR}/../ShardStability.robot
 Resource          ${CURDIR}/../WaitForFailure.robot
 
 *** Variables ***
@@ -97,6 +98,7 @@ Verify_Singleton_Constant_On_Nodes
 Verify_Singleton_Constant_During_Isolation
     [Documentation]    Iterate over all non-isolated cluster nodes. They should return the correct constant.
     : FOR    ${index}    IN    @{cs_all_indices}
+    \    BuiltIn.Run_Keyword_If    "${index}" == "${cs_isolated_index}"    BuiltIn.Log    Node not triggered, behavior not well described, see bugs 8207, 8214.
     \    BuiltIn.Run_Keyword_Unless    "${index}" == "${cs_isolated_index}"    Verify_Singleton_Constant_On_Node    ${index}    ${CS_CONSTANT_PREFIX}${cs_owner}
 
 Isolate_Owner_And_Verify_Isolated
@@ -105,6 +107,7 @@ Isolate_Owner_And_Verify_Isolated
     BuiltIn.Set_Suite_Variable    ${cs_isolated_index}    ${cs_owner}
     ${non_isolated_list} =    ClusterManagement.List_Indices_Minus_Member    ${cs_isolated_index}    member_index_list=${cs_all_indices}
     ${node_to_ask} =    Collections.Get_From_list    ${non_isolated_list}    0
+    BuiltIn.Wait_Until_Keyword_Succeeds    60s    10s    ShardStability.Shards_Stability_Get_Details    ${DEFAULT_SHARD_LIST}    member_index_list=${non_isolated_list}
     BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    ClusterManagement.Check_New_Owner_Got_Elected_For_Device    ${CS_DEVICE_NAME}    ${CS_DEVICE_TYPE}    ${cs_isolated_index}
     ...    ${node_to_ask}
     Get_And_Save_Present_CsOwner_And_CsCandidates    ${node_to_ask}
@@ -113,7 +116,8 @@ Isolate_Owner_And_Verify_Isolated
 Rejoin_Node_And_Verify_Rejoined
     [Documentation]    Rejoin isolated node.
     ClusterManagement.Rejoin_Member_From_List_Or_All    ${cs_isolated_index}
-    BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    Verify_Singleton_Constant_On_Node    ${cs_isolated_index}    ${CS_CONSTANT_PREFIX}${cs_owner}
+    BuiltIn.Wait_Until_Keyword_Succeeds    60s    10s    ShardStability.Shards_Stability_Get_Details    ${DEFAULT_SHARD_LIST}
+    BuiltIn.Wait_Until_Keyword_Succeeds    60s    3s    Verify_Singleton_Constant_On_Node    ${cs_isolated_index}    ${CS_CONSTANT_PREFIX}${cs_owner}
 
 Register_Flapping_Singleton_On_Nodes
     [Arguments]    ${index_list}