Skip to content

Commit 30c506d

Browse files
committed
improvements
Signed-off-by: Attila Mészáros <[email protected]>
1 parent dec6ce2 commit 30c506d

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

spark-operator/src/test/java/org/apache/spark/k8s/operator/config/SparkOperatorConfigMapReconcilerTest.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.util.Map;
99
import java.util.function.Function;
1010

11+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
1112
import io.fabric8.kubeapitest.junit.EnableKubeAPIServer;
1213
import io.fabric8.kubernetes.api.model.ConfigMap;
1314
import io.fabric8.kubernetes.api.model.ObjectMetaBuilder;
@@ -17,20 +18,22 @@
1718
import org.junit.jupiter.api.BeforeEach;
1819
import org.junit.jupiter.api.Test;
1920

21+
@SuppressFBWarnings(
22+
value = {"UWF_UNWRITTEN_FIELD"},
23+
justification = "Unwritten fields are covered by Kubernetes mock client")
2024
@EnableKubeAPIServer
2125
class SparkOperatorConfigMapReconcilerTest {
2226

2327
public static final Long TARGET_RECONCILER_INTERVAL = 60L;
24-
static KubernetesClient client;
28+
29+
private static KubernetesClient client;
2530

2631
Operator operator;
2732

2833
@BeforeEach
2934
void startController() {
30-
var namespaceUpdater = mock(Function.class);
31-
var watchedNamespaceGetter = mock(Function.class);
32-
33-
var reconciler = new SparkOperatorConfigMapReconciler(namespaceUpdater, watchedNamespaceGetter);
35+
var reconciler =
36+
new SparkOperatorConfigMapReconciler(mock(Function.class), mock(Function.class));
3437
operator = new Operator(o -> o.withKubernetesClient(client));
3538
operator.register(reconciler);
3639
operator.start();

0 commit comments

Comments
 (0)