diff --git a/src/main/java/io/streams/operators/EOperator.java b/src/main/java/io/streams/operators/InstallableOperator.java similarity index 87% rename from src/main/java/io/streams/operators/EOperator.java rename to src/main/java/io/streams/operators/InstallableOperator.java index 2dc9f62..73e001d 100644 --- a/src/main/java/io/streams/operators/EOperator.java +++ b/src/main/java/io/streams/operators/InstallableOperator.java @@ -4,7 +4,7 @@ */ package io.streams.operators; -public enum EOperator { +public enum InstallableOperator { STRIMZI, FLINK, CERT_MANAGER, diff --git a/src/main/java/io/streams/operators/OperatorInstaller.java b/src/main/java/io/streams/operators/OperatorInstaller.java index c21bd10..03d3fa7 100644 --- a/src/main/java/io/streams/operators/OperatorInstaller.java +++ b/src/main/java/io/streams/operators/OperatorInstaller.java @@ -36,12 +36,12 @@ private OperatorInstaller() { * * @param operators list of operators */ - public static void installRequiredOperators(EOperator... operators) throws Exception { + public static void installRequiredOperators(InstallableOperator... operators) throws Exception { List> operatorWaiting = new ArrayList<>(); List> additionalOperatorWaiting = new ArrayList<>(); // Install every operator except flink if present - for (EOperator operator : operators) { + for (InstallableOperator operator : operators) { switch (operator) { case STRIMZI -> operatorWaiting.add(installStrimziOperator()); case APICURIO -> operatorWaiting.add(installApicurioOperator()); @@ -56,7 +56,7 @@ public static void installRequiredOperators(EOperator... operators) throws Excep CompletableFuture.allOf(operatorWaiting.toArray(new CompletableFuture[0])).join(); // if flink is present, install it - if (Arrays.asList(operators).contains(EOperator.FLINK)) { + if (Arrays.asList(operators).contains(InstallableOperator.FLINK)) { additionalOperatorWaiting.add(installFlinkOperator()); CompletableFuture.allOf(additionalOperatorWaiting.toArray(new CompletableFuture[0])).join(); } diff --git a/src/test/java/io/streams/e2e/flink/sql/SqlExampleST.java b/src/test/java/io/streams/e2e/flink/sql/SqlExampleST.java index 3da70cf..349205d 100644 --- a/src/test/java/io/streams/e2e/flink/sql/SqlExampleST.java +++ b/src/test/java/io/streams/e2e/flink/sql/SqlExampleST.java @@ -24,7 +24,7 @@ import io.streams.operands.strimzi.resources.KafkaType; import io.streams.operands.strimzi.templates.KafkaNodePoolTemplate; import io.streams.operands.strimzi.templates.KafkaTemplate; -import io.streams.operators.EOperator; +import io.streams.operators.InstallableOperator; import io.streams.operators.OperatorInstaller; import io.streams.sql.TestStatements; import io.streams.utils.kube.JobUtils; @@ -68,10 +68,10 @@ public class SqlExampleST extends Abstract { @BeforeAll void prepareOperators() throws Exception { OperatorInstaller.installRequiredOperators( - EOperator.FLINK, - EOperator.APICURIO, - EOperator.STRIMZI, - EOperator.CERT_MANAGER); + InstallableOperator.FLINK, + InstallableOperator.APICURIO, + InstallableOperator.STRIMZI, + InstallableOperator.CERT_MANAGER); } @TestDoc( diff --git a/src/test/java/io/streams/e2e/flink/sql/SqlJobRunnerST.java b/src/test/java/io/streams/e2e/flink/sql/SqlJobRunnerST.java index 3fd1ff1..2df5944 100644 --- a/src/test/java/io/streams/e2e/flink/sql/SqlJobRunnerST.java +++ b/src/test/java/io/streams/e2e/flink/sql/SqlJobRunnerST.java @@ -29,7 +29,7 @@ import io.streams.operands.strimzi.templates.KafkaNodePoolTemplate; import io.streams.operands.strimzi.templates.KafkaTemplate; import io.streams.operands.strimzi.templates.KafkaUserTemplate; -import io.streams.operators.EOperator; +import io.streams.operators.InstallableOperator; import io.streams.operators.OperatorInstaller; import io.streams.sql.TestStatements; import io.streams.utils.MinioUtils; @@ -77,10 +77,10 @@ public class SqlJobRunnerST extends Abstract { @BeforeAll void prepareOperators() throws Exception { OperatorInstaller.installRequiredOperators( - EOperator.FLINK, - EOperator.APICURIO, - EOperator.STRIMZI, - EOperator.CERT_MANAGER); + InstallableOperator.FLINK, + InstallableOperator.APICURIO, + InstallableOperator.STRIMZI, + InstallableOperator.CERT_MANAGER); } @TestDoc(