Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -564,15 +564,9 @@ tests:
- class: org.elasticsearch.cluster.ClusterStateSerializationTests
method: testSerializationPreMultiProject
issue: https://github.com/elastic/elasticsearch/issues/130872
- class: org.elasticsearch.cluster.coordination.votingonly.VotingOnlyNodePluginTests
method: testPreferFullMasterOverVotingOnlyNodes
issue: https://github.com/elastic/elasticsearch/issues/130883
- class: org.elasticsearch.search.SearchWithRejectionsIT
method: testOpenContextsAfterRejections
issue: https://github.com/elastic/elasticsearch/issues/130821
- class: org.elasticsearch.cluster.coordination.votingonly.VotingOnlyNodePluginTests
method: testVotingOnlyNodesCannotBeMasterWithoutFullMasterNodes
issue: https://github.com/elastic/elasticsearch/issues/130979
- class: org.elasticsearch.packaging.test.DockerTests
method: test082CannotUseEnvVarsAndFiles
issue: https://github.com/elastic/elasticsearch/issues/129808
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse;
import org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.metadata.ProjectId;
import org.elasticsearch.cluster.metadata.RepositoryMetadata;
import org.elasticsearch.cluster.node.DiscoveryNode;
Expand Down Expand Up @@ -96,12 +97,12 @@ public void testPreferFullMasterOverVotingOnlyNodes() throws Exception {
internalCluster().setBootstrapMasterNodeIndex(0);
internalCluster().startNodes(2);
internalCluster().startNode(addRoles(Set.of(DiscoveryNodeRole.VOTING_ONLY_NODE_ROLE)));
internalCluster().startDataOnlyNodes(randomInt(2));
assertBusy(
() -> assertThat(
clusterAdmin().prepareState(TEST_REQUEST_TIMEOUT).get().getState().getLastCommittedConfiguration().getNodeIds().size(),
equalTo(3)
)
final int numDataNodes = randomInt(2);
internalCluster().startDataOnlyNodes(numDataNodes);
internalCluster().validateClusterFormed();

awaitClusterState(
state -> state.getLastCommittedConfiguration().getNodeIds().size() == 3 && state.nodes().size() == 3 + numDataNodes
);
final String originalMaster = internalCluster().getMasterName();

Expand Down Expand Up @@ -157,15 +158,14 @@ public void testVotingOnlyNodesCannotBeMasterWithoutFullMasterNodes() throws Exc
internalCluster().setBootstrapMasterNodeIndex(0);
internalCluster().startNode();
internalCluster().startNodes(2, addRoles(Set.of(DiscoveryNodeRole.VOTING_ONLY_NODE_ROLE)));
internalCluster().startDataOnlyNodes(randomInt(2));
assertBusy(
() -> assertThat(
clusterAdmin().prepareState(TEST_REQUEST_TIMEOUT).get().getState().getLastCommittedConfiguration().getNodeIds().size(),
equalTo(3)
)
final int numDataNodes = randomInt(2);
internalCluster().startDataOnlyNodes(numDataNodes);
internalCluster().validateClusterFormed();

awaitClusterState(
state -> state.getLastCommittedConfiguration().getNodeIds().size() == 3 && state.nodes().size() == 3 + numDataNodes
);
awaitMasterNode();
final String oldMasterId = clusterAdmin().prepareState(TEST_REQUEST_TIMEOUT).get().getState().nodes().getMasterNodeId();
final String oldMasterId = internalCluster().getMasterName();

internalCluster().stopCurrentMasterNode();
awaitMasterNotFound();
Expand Down