2 Documentation DOMRpcBroker testing: RPC Provider Partition And Heal
4 ... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
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
10 ... This tests establishes that the RPC service operates correctly when faced
11 ... with node failures.
12 ... This suite supports more than three node cluster setup too.
15 Resource ${CURDIR}/../../../libraries/controller/DrbCommons.robot
16 Resource ${CURDIR}/../../../libraries/SetupUtils.robot
17 Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
20 Suite Teardown SSHLibrary.Close_All_Connections
21 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
22 Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
28 @{INSTALLED_RPC_MEMEBER_IDX_LIST} ${1} ${2}
29 ${TESTED_MEMBER_WITHOUT_RPC_IDX} ${3}
33 Register_Rpc_On_Two_Nodes
34 [Documentation] Register rpc on two nodes of the odl cluster.
35 DrbCommons.Register_Rpc_On_Nodes ${INSTALLED_RPC_MEMEBER_IDX_LIST}
37 Invoke_Rpc_On_Each_Node
38 [Documentation] Invoke get-constant rpc on every node of the cluster. When requested on the node with
39 ... local instance the local value is expected. If invoked on the node with no local instance, any remote
40 ... value is expected.
41 DrbCommons.Verify_Constant_On_Active_Nodes
44 [Documentation] Isolate one node with registered rpc.
45 ... From the constant returned from the ${TESTED_MEMBER_WITHOUT_RPC_IDX} node (with no rpc instance) an index of
46 ... the node to be isolated is derived. And in the tc Invoke_Rpc_On_Remaining_Nodes a different constant
48 ${isolated_idx} = DrbCommons.Get_Constant_Index_From_Node ${TESTED_MEMBER_WITHOUT_RPC_IDX}
49 BuiltIn.Set_Suite_Variable ${isolated_idx}
50 DrbCommons.Isolate_Node ${isolated_idx}
52 Invoke_Rpc_On_Nonisolated_Nodes
53 [Documentation] Invoke rpc on non-islolated nodes.
54 BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s DrbCommons.Verify_Constant_On_Active_Nodes
56 Rejoin_Isolated_Member
57 [Documentation] Rejoin isolated node
58 DrbCommons.Rejoin_Node ${isolated_idx}
60 Invoke_Rpc_On_Each_Node_Again
61 [Documentation] Invoke rpc get-constant on every node. When requested on the node with
62 ... local instance the local value is expected. If invoked on the node with no local instance, any remote
63 ... value is expected.
64 WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
67 ... DrbCommons.Verify_Constant_On_Active_Nodes
69 Unregister_Rpc_On_Each_Node
70 [Documentation] Inregister rpc on both nodes.
71 DrbCommons.Unregister_Rpc_On_Nodes ${INSTALLED_RPC_MEMEBER_IDX_LIST}
76 [Documentation] Setup keyword. Create ${possible_constants} list with possible variables of remote constants.
77 SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
78 DrbCommons.DrbCommons_Init