diff --git a/cluster-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/KafkaRebalanceAssemblyOperator.java b/cluster-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/KafkaRebalanceAssemblyOperator.java index 54751406312..f5e66e652dc 100644 --- a/cluster-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/KafkaRebalanceAssemblyOperator.java +++ b/cluster-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/KafkaRebalanceAssemblyOperator.java @@ -356,9 +356,9 @@ private KafkaRebalanceStatus updateStatus(KafkaRebalance kafkaRebalance, return rebalanceOptionsBuilder; } - private Future reconcile(Reconciliation reconciliation, String host, - CruiseControlApi apiClient, KafkaRebalance kafkaRebalance, - KafkaRebalanceState currentState) { + private Future handleRebalance(Reconciliation reconciliation, String host, + CruiseControlApi apiClient, KafkaRebalance kafkaRebalance, + KafkaRebalanceState currentState) { if (kafkaRebalance != null && kafkaRebalance.getStatus() != null && "Ready".equals(rebalanceStateConditionType(kafkaRebalance.getStatus())) @@ -1031,7 +1031,7 @@ private Future> onReady(Reconcilia * Reconcile loop for the KafkaRebalance */ @SuppressWarnings({"checkstyle:NPathComplexity"}) - /* test */ Future reconcileRebalance(Reconciliation reconciliation, KafkaRebalance kafkaRebalance) { + /* test */ Future reconcileKafkaRebalance(Reconciliation reconciliation, KafkaRebalance kafkaRebalance) { if (kafkaRebalance == null) { LOGGER.infoCr(reconciliation, "KafkaRebalance resource deleted"); return Future.succeededFuture(); @@ -1133,7 +1133,7 @@ private Future> onReady(Reconcilia } currentState = KafkaRebalanceState.valueOf(rebalanceStateType); } - return reconcile(reconciliation, cruiseControlHost(clusterName, clusterNamespace), + return handleRebalance(reconciliation, cruiseControlHost(clusterName, clusterNamespace), apiClient, currentKafkaRebalance, currentState); }, exception -> Future.failedFuture(exception)); }); @@ -1353,12 +1353,12 @@ private KafkaRebalanceState state(KafkaRebalance kafkaRebalance) { @Override protected Future createOrUpdate(Reconciliation reconciliation, KafkaRebalance resource) { - return reconcileRebalance(reconciliation, resource); + return reconcileKafkaRebalance(reconciliation, resource); } @Override protected Future delete(Reconciliation reconciliation) { - return reconcileRebalance(reconciliation, null).map(v -> Boolean.TRUE); + return reconcileKafkaRebalance(reconciliation, null).map(v -> Boolean.TRUE); } @Override diff --git a/cluster-operator/src/test/java/io/strimzi/operator/cluster/operator/assembly/KafkaRebalanceAssemblyOperatorTest.java b/cluster-operator/src/test/java/io/strimzi/operator/cluster/operator/assembly/KafkaRebalanceAssemblyOperatorTest.java index 58fa113d35f..181dadc3e4f 100644 --- a/cluster-operator/src/test/java/io/strimzi/operator/cluster/operator/assembly/KafkaRebalanceAssemblyOperatorTest.java +++ b/cluster-operator/src/test/java/io/strimzi/operator/cluster/operator/assembly/KafkaRebalanceAssemblyOperatorTest.java @@ -1311,7 +1311,7 @@ public void testKafkaClusterNotMatchingSelector(VertxTestContext context) { Checkpoint checkpoint = context.checkpoint(); krao = createKafkaRebalanceAssemblyOperator(ClusterOperatorConfig.buildFromMap(Map.of(ClusterOperatorConfig.CUSTOM_RESOURCE_SELECTOR.key(), "selector=matching"), KafkaVersionTestUtils.getKafkaVersionLookup())); - krao.reconcileRebalance(new Reconciliation("test-trigger", KafkaRebalance.RESOURCE_KIND, namespace, RESOURCE_NAME), kr) + krao.reconcileKafkaRebalance(new Reconciliation("test-trigger", KafkaRebalance.RESOURCE_KIND, namespace, RESOURCE_NAME), kr) .onComplete(context.succeeding(v -> context.verify(() -> { assertThat(v, is(nullValue())); checkpoint.flag();