From 3e326e320884e21d1ed6ce2fb76e281b5201d01f Mon Sep 17 00:00:00 2001 From: Yang Wang Date: Tue, 10 Oct 2023 18:13:35 +1100 Subject: [PATCH] tweak --- .../java/org/elasticsearch/gateway/GatewayServiceTests.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/gateway/GatewayServiceTests.java b/server/src/test/java/org/elasticsearch/gateway/GatewayServiceTests.java index 65b8c848ba4be..ca0577136a978 100644 --- a/server/src/test/java/org/elasticsearch/gateway/GatewayServiceTests.java +++ b/server/src/test/java/org/elasticsearch/gateway/GatewayServiceTests.java @@ -484,8 +484,7 @@ public void onFailure(Exception e) { private MasterServiceTaskQueue createSetClusterStateTaskQueue(ClusterService clusterService) { return clusterService.createTaskQueue("set-cluster-state", Priority.NORMAL, batchExecutionContext -> { - final ClusterState initialState = batchExecutionContext.initialState(); - ClusterState targetState = initialState; + ClusterState targetState = batchExecutionContext.initialState(); for (var taskContext : batchExecutionContext.taskContexts()) { targetState = taskContext.getTask().clusterState(); taskContext.success(() -> {});