-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace internal usages of 'master' term in 'server/src/test' directory #2520
Changes from all commits
6b0ce71
36ebbcb
63e5728
47c5c0b
a130464
3747411
33ebf86
9751c84
8db5521
d6dda60
b4953ad
44c6122
bddb976
4f8cf38
a01fd4e
6b756ec
fa6e5ed
47cfbab
dbb085b
4f71700
50fcf3b
737843f
a87cede
37a0b17
51d5007
704f00c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,7 +91,7 @@ public void testClusterManagerNodeGCs() throws Exception { | |
|
||
logger.info("waiting for nodes to de-elect cluster-manager [{}]", oldClusterManagerNode); | ||
for (String node : oldNonClusterManagerNodesSet) { | ||
assertDifferentMaster(node, oldClusterManagerNode); | ||
assertDifferentClusterManager(node, oldClusterManagerNode); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They are all public method or class, |
||
} | ||
|
||
logger.info("waiting for nodes to elect a new cluster-manager"); | ||
|
@@ -107,7 +107,7 @@ public void testClusterManagerNodeGCs() throws Exception { | |
// make sure all nodes agree on cluster-manager | ||
String newClusterManager = internalCluster().getMasterName(); | ||
assertThat(newClusterManager, not(equalTo(oldClusterManagerNode))); | ||
assertMaster(newClusterManager, nodes); | ||
assertClusterManager(newClusterManager, nodes); | ||
} | ||
|
||
/** | ||
|
@@ -137,7 +137,7 @@ public void testIsolateClusterManagerAndVerifyClusterStateConsensus() throws Exc | |
ensureStableCluster(2, nonIsolatedNode); | ||
|
||
// make sure isolated need picks up on things. | ||
assertNoMaster(isolatedNode, TimeValue.timeValueSeconds(40)); | ||
assertNoClusterManager(isolatedNode, TimeValue.timeValueSeconds(40)); | ||
|
||
// restore isolation | ||
networkDisruption.stopDisrupting(); | ||
|
@@ -227,7 +227,7 @@ public void testVerifyApiBlocksDuringPartition() throws Exception { | |
// continuously ping until network failures have been resolved. However | ||
// It may a take a bit before the node detects it has been cut off from the elected cluster-manager | ||
logger.info("waiting for isolated node [{}] to have no cluster-manager", isolatedNode); | ||
assertNoMaster(isolatedNode, NoMasterBlockService.NO_MASTER_BLOCK_WRITES, TimeValue.timeValueSeconds(30)); | ||
assertNoClusterManager(isolatedNode, NoMasterBlockService.NO_MASTER_BLOCK_WRITES, TimeValue.timeValueSeconds(30)); | ||
|
||
logger.info("wait until elected cluster-manager has been removed and a new 2 node cluster was from (via [{}])", isolatedNode); | ||
ensureStableCluster(2, nonIsolatedNode); | ||
|
@@ -273,7 +273,7 @@ public void testVerifyApiBlocksDuringPartition() throws Exception { | |
// continuously ping until network failures have been resolved. However | ||
// It may a take a bit before the node detects it has been cut off from the elected cluster-manager | ||
logger.info("waiting for isolated node [{}] to have no cluster-manager", isolatedNode); | ||
assertNoMaster(isolatedNode, NoMasterBlockService.NO_MASTER_BLOCK_ALL, TimeValue.timeValueSeconds(30)); | ||
assertNoClusterManager(isolatedNode, NoMasterBlockService.NO_MASTER_BLOCK_ALL, TimeValue.timeValueSeconds(30)); | ||
|
||
// make sure we have stable cluster & cross partition recoveries are canceled by the removal of the missing node | ||
// the unresponsive partition causes recoveries to only time out after 15m (default) and these will cause | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,7 +81,7 @@ public void testClusterJoinDespiteOfPublishingIssues() throws Exception { | |
); | ||
nonClusterManagerTransportService.addFailToSendNoConnectRule(clusterManagerTranspotService); | ||
|
||
assertNoMaster(nonClusterManagerNode); | ||
assertNoClusterManager(nonClusterManagerNode); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above, |
||
|
||
logger.info( | ||
"blocking cluster state publishing from cluster-manager [{}] to non cluster-manager [{}]", | ||
|
@@ -166,7 +166,7 @@ public void testElectClusterManagerWithLatestVersion() throws Exception { | |
logger.info("--> forcing a complete election to make sure \"preferred\" cluster-manager is elected"); | ||
isolateAllNodes.startDisrupting(); | ||
for (String node : nodes) { | ||
assertNoMaster(node); | ||
assertNoClusterManager(node); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://github.com/opensearch-project/OpenSearch/blob/2.0.0-rc1/server/src/main/java/org/opensearch/cluster/service/ClusterService.java#L216 is a public method in |
||
} | ||
internalCluster().clearDisruptionScheme(); | ||
ensureStableCluster(3); | ||
|
@@ -194,7 +194,7 @@ public void testElectClusterManagerWithLatestVersion() throws Exception { | |
logger.info("--> forcing a complete election again"); | ||
isolateAllNodes.startDisrupting(); | ||
for (String node : nodes) { | ||
assertNoMaster(node); | ||
assertNoClusterManager(node); | ||
} | ||
|
||
isolateAllNodes.stopDisrupting(); | ||
|
@@ -242,7 +242,7 @@ public void testNodeNotReachableFromClusterManager() throws Exception { | |
ensureStableCluster(2, clusterManagerNode); | ||
|
||
logger.info("waiting for [{}] to have no cluster-manager", nonClusterManagerNode); | ||
assertNoMaster(nonClusterManagerNode); | ||
assertNoClusterManager(nonClusterManagerNode); | ||
|
||
logger.info("healing partition and checking cluster reforms"); | ||
clusterManagerTransportService.clearAllRules(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,9 +110,9 @@ public void testClusterHealth() throws IOException { | |
assertThat(clusterHealth.getActiveShardsPercent(), is(allOf(greaterThanOrEqualTo(0.0), lessThanOrEqualTo(100.0)))); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will address it in separate PR, and will paste the link later. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created new PR #3432 to rename |
||
} | ||
|
||
public void testClusterHealthVerifyMasterNodeDiscovery() throws IOException { | ||
public void testClusterHealthVerifyClusterManagerNodeDiscovery() throws IOException { | ||
DiscoveryNode localNode = new DiscoveryNode("node", OpenSearchTestCase.buildNewFakeTransportAddress(), Version.CURRENT); | ||
// set the node information to verify master_node discovery in ClusterHealthResponse | ||
// set the node information to verify cluster_manager_node discovery in ClusterHealthResponse | ||
ClusterState clusterState = ClusterState.builder(ClusterName.CLUSTER_NAME_SETTING.getDefault(Settings.EMPTY)) | ||
.nodes(DiscoveryNodes.builder().add(localNode).localNodeId(localNode.getId()).masterNodeId(localNode.getId())) | ||
owaiskazi19 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
.build(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just putting it here the variables remaining in this file:
getMasterName
,startMasterOnlyNodes
. Feel free to link if you any PR already.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your review! 👍
The getMasterName() and startMasterOnlyNodes() are both public method, which are published to maven, I will rename them in the next phase (issue #1684) and target for version 3.0.
In the next step, I will rename all the other class and method with
master
terminology.