Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename enum with installable operators by streams-e2e suite #95

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
package io.streams.operators;

public enum EOperator {
public enum InstallableOperator {
STRIMZI,
FLINK,
CERT_MANAGER,
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/io/streams/operators/OperatorInstaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<CompletableFuture<?>> operatorWaiting = new ArrayList<>();
List<CompletableFuture<?>> 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());
Expand All @@ -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();
}
Expand Down
10 changes: 5 additions & 5 deletions src/test/java/io/streams/e2e/flink/sql/SqlExampleST.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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(
Expand Down
10 changes: 5 additions & 5 deletions src/test/java/io/streams/e2e/flink/sql/SqlJobRunnerST.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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(
Expand Down