Migrate Get Requests invocations(libraries)
[integration/test.git] / csit / suites / controller / dom_data_broker / explicit_leader_movement_longevity.robot
1 *** Settings ***
2 Documentation       DOMDataBroker testing: Explicit Leader Movement
3 ...
4 ...                 Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
5 ...
6 ...                 This program and the accompanying materials are made available under the
7 ...                 terms of the Eclipse Public License v1.0 which accompanies this distribution,
8 ...                 and is available at http://www.eclipse.org/legal/epl-v10.html
9 ...
10 ...                 The goal is to ensure that applications do not observe disruption when a shard
11 ...                 leader is moved as the result of explicit application request. This is performed
12 ...                 by having a steady-stream producer execute operations against the shard and then
13 ...                 initiate shard leader shutdown, then the producer is shut down cleanly.
14
15 Library             SSHLibrary
16 Resource            ${CURDIR}/../../../libraries/controller/DdbCommons.robot
17 Resource            ${CURDIR}/../../../libraries/KarafKeywords.robot
18 Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
19
20 Suite Setup         SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
21 Suite Teardown      SSHLibrary.Close_All_Connections
22 Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
23 Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
24
25 Default Tags        critical
26
27
28 *** Variables ***
29 # TODO: change back to 24h when releng has more granular steps to kill VMs than days; now 23h=82800s
30 ${LONGEVITY_TEST_DURATION_IN_SECS}      82800
31 @{MOVEMENT_DIRECTION_LIST}              remote    local    remote
32
33
34 *** Test Cases ***
35 Explicit_Leader_Movement_Test
36     [Documentation]    Leader move for 24 hours from one node to another
37     WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
38     ...    ${LONGEVITY_TEST_DURATION_IN_SECS}
39     ...    5s
40     ...    Test_Scenario
41
42
43 *** Keywords ***
44 Test_Scenario
45     [Documentation]    One leader movement scenario based on randomly chosen direction.
46     ${node_from}    ${node_to}    BuiltIn.Evaluate    random.sample(${MOVEMENT_DIRECTION_LIST}, 2)    modules=random
47     DdbCommons.Explicit_Leader_Movement_Test_Templ    ${node_from}    ${node_to}