Reduce the number of polling iterations in WUKS
[integration/test.git] / csit / suites / sxp / clustering / 010_Connection_switchover.robot
1 *** Settings ***
2 Documentation     Test suite to test cluster connection switchover
3 Suite Setup       Setup SXP Cluster Session
4 Suite Teardown    Clean SXP Cluster Session
5 Test Setup        Setup SXP Cluster
6 Test Teardown     Clean SXP Cluster
7 Library           ../../../libraries/Sxp.py
8 Resource          ../../../libraries/ClusterManagement.robot
9 Resource          ../../../libraries/SxpClusterLib.robot
10
11 *** Variables ***
12 ${SAMPLES}        1
13
14 *** Test Cases ***
15 Isolation of SXP service follower Test
16     [Documentation]    Test SXP connection switchover only if Controller with SCS is isolated
17     Check Shards Status
18     : FOR    ${i}    IN RANGE    0    ${SAMPLES}
19     \    ${controller_index}    Get Active Controller
20     \    Isolate SXP Controller    ${controller_index}
21
22 Isolation of SXP noservice follower Test
23     [Documentation]    Test SXP connection switchover only if Controller without SCS are isolated
24     Check Shards Status
25     : FOR    ${i}    IN RANGE    0    ${SAMPLES}
26     \    ${controller_index}    Get Inactive Controller
27     \    Isolate SXP Controller    ${controller_index}
28
29 *** Keywords ***
30 Isolate SXP Controller
31     [Arguments]    ${controller_index}
32     [Documentation]    Isolate one of cluster nodes and perform check that Device is still connected afterwards reverts isolation
33     Isolate_Member_From_List_Or_All    ${controller_index}
34     Wait Until Keyword Succeeds    240    1    Sync_Status_Should_Be_False    ${controller_index}
35     Wait Until Keyword Succeeds    60    1    Check Device is Connected    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}
36     Flush_Iptables_From_List_Or_All
37     Wait Until Keyword Succeeds    240    1    Sync_Status_Should_Be_True    ${controller_index}
38     Wait Until Keyword Succeeds    60    1    Check Device is Connected    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}