Library scope: | GLOBAL |
---|
Cluster Singleton testing: Common Keywords
Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
Cluster Singleton service is designed to ensure that only one instance of an application is registered globally in the cluster.
Creates and uses the following suite variables: Created by Cluster_Singleton_Init: ${cs_all_indices} ${cs_exp_candidates} Created by Get_And_Save_Present_CsOwner_And_CsCandidates: ${cs_owner} ${cs_candidates} Created by Isolate_Owner_And_Verify_Isolated ${cs_isolated_index}
Resouce initial keyword. Creates {cs_exp_candidates} and {cs_all_indices} suite variables which are used in other keywords.
Store owner index into suite variables.
Isolate the owner cluster node. Wait until the new owner is elected and store new values of owner and candidates.
Verify that the owner remains on the same node after non-owner candidate is unregistered.
Register a candidate application on each node which starts the test.
Register the singleton candidate and add it to the list of ${cs_exp_candidates}.
Register a candidate application on given nodes.
Rejoin isolated node.
Unregister the testing service and check recevied statistics.
Unregister the singleton candidate. Also remove it from the list of ${cs_exp_candidates}.
Unregister the application from given nodes.
Fail if the actual owner is different from ${owner_index} or if the actual candidate list is different from ${cs_exp_candidates}.
Iterate over all non-isolated cluster nodes. They should return the correct constant.
Verify that the expected constant is return from the given node.
Iterate over all cluster nodes and all should return expected constant.