Skip to content

Commit 5206587

Browse files
committed
Revert "Add forcibly argument to test cluster stop node method (#98336)"
This reverts commit 2975f33.
1 parent 2975f33 commit 5206587

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

test/test-clusters/src/main/java/org/elasticsearch/test/cluster/ClusterHandle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public interface ClusterHandle extends Closeable {
3434
* Stops the node at a given index.
3535
* @param index of the node to stop
3636
*/
37-
void stopNode(int index, boolean forcibly);
37+
void stopNode(int index);
3838

3939
/**
4040
* Restarts the cluster. Effectively the same as calling {@link #stop(boolean)} followed by {@link #start()}

test/test-clusters/src/main/java/org/elasticsearch/test/cluster/DefaultElasticsearchCluster.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ public void stop(boolean forcibly) {
5555
}
5656

5757
@Override
58-
public void stopNode(int index, boolean forcibly) {
58+
public void stopNode(int index) {
5959
checkHandle();
60-
handle.stopNode(index, forcibly);
60+
handle.stopNode(index);
6161
}
6262

6363
@Override

test/test-clusters/src/main/java/org/elasticsearch/test/cluster/local/LocalClusterHandle.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public void start() {
7676
public void stop(boolean forcibly) {
7777
if (started.getAndSet(false)) {
7878
LOGGER.info("Stopping Elasticsearch test cluster '{}', forcibly: {}", name, forcibly);
79-
execute(() -> nodes.parallelStream().forEach(n -> stopNode(nodes.indexOf(n), forcibly)));
79+
execute(() -> nodes.parallelStream().forEach(n -> n.stop(forcibly)));
8080
} else {
8181
// Make sure the process is stopped, otherwise wait
8282
execute(() -> nodes.parallelStream().forEach(Node::waitForExit));
@@ -167,7 +167,7 @@ public long getPid(int index) {
167167
return nodes.get(index).getPid();
168168
}
169169

170-
public void stopNode(int index, boolean forcibly) {
170+
public void stopNode(int index) {
171171
nodes.get(index).stop(false);
172172
}
173173

0 commit comments

Comments
 (0)