Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public Settings onNodeStopped(String nodeName) throws IOException {
public void testClearVotingTombstonesNotWaitingForRemoval() throws Exception {
internalCluster().setBootstrapMasterNodeIndex(2);
List<String> nodes = internalCluster().startNodes(3);
ensureStableCluster(3);
RestClient restClient = getRestClient();
Response response = restClient.performRequest(new Request("POST", "/_cluster/voting_config_exclusions/" + nodes.get(2)));
assertThat(response.getStatusLine().getStatusCode(), is(200));
Expand All @@ -131,6 +132,7 @@ public void testClearVotingTombstonesNotWaitingForRemoval() throws Exception {
public void testClearVotingTombstonesWaitingForRemoval() throws Exception {
internalCluster().setBootstrapMasterNodeIndex(2);
List<String> nodes = internalCluster().startNodes(3);
ensureStableCluster(3);
RestClient restClient = getRestClient();
String nodeToWithdraw = nodes.get(randomIntBetween(0, 2));
Response response = restClient.performRequest(new Request("POST", "/_cluster/voting_config_exclusions/" + nodeToWithdraw));
Expand All @@ -145,6 +147,7 @@ public void testClearVotingTombstonesWaitingForRemoval() throws Exception {
public void testFailsOnUnknownNode() throws Exception {
internalCluster().setBootstrapMasterNodeIndex(2);
internalCluster().startNodes(3);
ensureStableCluster(3);
RestClient restClient = getRestClient();
try {
restClient.performRequest(new Request("POST", "/_cluster/voting_config_exclusions/invalid"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public void testCannotCommitStateThreeNodes() throws Exception {
.build();

internalCluster().startNodes(3, settings);
ensureGreen(); // ensure cluster state is recovered before we disrupt things
ensureStableCluster(3);

final String master = internalCluster().getMasterName();
Set<String> otherNodes = new HashSet<>(Arrays.asList(internalCluster().getNodeNames()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ public void testDetachAbortedByUser() throws IOException {
expectThrows(() -> detachCluster(environment, 0, true), ElasticsearchNodeCommand.ABORTED_BY_USER_MSG);
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/39220")
public void test3MasterNodes2Failed() throws Exception {
internalCluster().setBootstrapMasterNodeIndex(2);
List<String> masterNodes = new ArrayList<>();
Expand All @@ -268,8 +267,12 @@ public void test3MasterNodes2Failed() throws Exception {
logger.info("--> start 2nd and 3rd master-eligible nodes and bootstrap");
masterNodes.addAll(internalCluster().startMasterOnlyNodes(2)); // node ordinals 2 and 3

logger.info("--> wait for all nodes to join the cluster");
ensureStableCluster(4);

logger.info("--> create index test");
createIndex("test");
ensureGreen("test");

logger.info("--> stop 2nd and 3d master eligible node");
internalCluster().stopRandomNode(InternalTestCluster.nameFilter(masterNodes.get(1)));
Expand Down