diff --git a/Makefile b/Makefile index 933178a..fe993ee 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ build: bounce: build undeploy deploy deploy-samples deploy-config deploy-demo # Integration tests expect K8s and Kafka to be running -integration-tests: +integration-tests: deploy-samples kubectl port-forward -n kafka svc/one-kafka-external-0 9092 & echo $$! > port-forward.pid ./gradlew intTest || kill `cat port-forward.pid` kill `cat port-forward.pid` @@ -44,7 +44,11 @@ deploy-samples: deploy kubectl wait --for=condition=Established=True \ crds/subscriptions.hoptimator.linkedin.com \ crds/kafkatopics.hoptimator.linkedin.com \ - crds/sqljobs.hoptimator.linkedin.com + crds/databases.hoptimator.linkedin.com \ + crds/views.hoptimator.linkedin.com \ + crds/pipelines.hoptimator.linkedin.com \ + crds/tabletemplates.hoptimator.linkedin.com \ + crds/jobtemplates.hoptimator.linkedin.com kubectl apply -f ./deploy/samples deploy-config: diff --git a/hoptimator-jdbc/src/testFixtures/java/com/linkedin/hoptimator/jdbc/QuidemTestBase.java b/hoptimator-jdbc/src/testFixtures/java/com/linkedin/hoptimator/jdbc/QuidemTestBase.java index a2cf557..d833ac0 100644 --- a/hoptimator-jdbc/src/testFixtures/java/com/linkedin/hoptimator/jdbc/QuidemTestBase.java +++ b/hoptimator-jdbc/src/testFixtures/java/com/linkedin/hoptimator/jdbc/QuidemTestBase.java @@ -83,7 +83,7 @@ public void execute(Context context, boolean execute) throws Exception { CalciteConnection conn = (CalciteConnection) context.connection(); RelNode rel = HoptimatorDriver.convert(conn.createPrepareContext(), sql).root.rel; String specs = DeploymentService.plan(rel).pipeline().specify().stream() - .collect(Collectors.joining("---\n")); + .sorted().collect(Collectors.joining("---\n")); String[] lines = specs.replaceAll(";\n","\n").split("\n"); context.echo(Arrays.asList(lines)); } else { diff --git a/hoptimator-kafka/src/test/resources/kafka-ddl.id b/hoptimator-kafka/src/test/resources/kafka-ddl.id index 349b717..16d96e9 100644 --- a/hoptimator-kafka/src/test/resources/kafka-ddl.id +++ b/hoptimator-kafka/src/test/resources/kafka-ddl.id @@ -2,36 +2,6 @@ !use k8s insert into kafka."existing-topic-1" select * from kafka."existing-topic-2"; -apiVersion: kafka.strimzi.io/v1beta2 -kind: KafkaTopic -metadata: - name: kafka-database-existing-topic-2 - namespace: kafka - labels: - strimzi.io/cluster: one -spec: - topicName: existing-topic-2 - partitions: 1 - replicas: 1 - config: - retention.ms: 7200000 - segment.bytes: 1073741824 ---- -apiVersion: kafka.strimzi.io/v1beta2 -kind: KafkaTopic -metadata: - name: kafka-database-existing-topic-1 - namespace: kafka - labels: - strimzi.io/cluster: one -spec: - topicName: existing-topic-1 - partitions: 1 - replicas: 1 - config: - retention.ms: 7200000 - segment.bytes: 1073741824 ---- apiVersion: flink.apache.org/v1beta1 kind: FlinkDeployment metadata: @@ -61,4 +31,34 @@ spec: parallelism: 1 upgradeMode: stateless state: running +--- +apiVersion: kafka.strimzi.io/v1beta2 +kind: KafkaTopic +metadata: + name: kafka-database-existing-topic-1 + namespace: kafka + labels: + strimzi.io/cluster: one +spec: + topicName: existing-topic-1 + partitions: 1 + replicas: 1 + config: + retention.ms: 7200000 + segment.bytes: 1073741824 +--- +apiVersion: kafka.strimzi.io/v1beta2 +kind: KafkaTopic +metadata: + name: kafka-database-existing-topic-2 + namespace: kafka + labels: + strimzi.io/cluster: one +spec: + topicName: existing-topic-2 + partitions: 1 + replicas: 1 + config: + retention.ms: 7200000 + segment.bytes: 1073741824 !specify