[
https://issues.apache.org/jira/browse/FLINK-9833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16563521#comment-16563521
]
ASF GitHub Bot commented on FLINK-9833:
---------------------------------------
fhueske commented on a change in pull request #6422: [FLINK-9833] [e2e] Add a
SQL Client end-to-end test with unified source/sink/format
URL: https://github.com/apache/flink/pull/6422#discussion_r206464503
##########
File path: flink-end-to-end-tests/test-scripts/test_sql_client.sh
##########
@@ -0,0 +1,272 @@
+#!/usr/bin/env bash
+################################################################################
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+source "$(dirname "$0")"/common.sh
+source "$(dirname "$0")"/kafka-common.sh
+
+SQL_TOOLBOX_JAR=$END_TO_END_DIR/flink-sql-client-test/target/SqlToolbox.jar
+SQL_JARS_DIR=$END_TO_END_DIR/flink-sql-client-test/target/sql-jars
+
+################################################################################
+# Verify existing SQL jars
+################################################################################
+
+EXTRACTED_JAR=$TEST_DATA_DIR/extracted
+
+mkdir -p $EXTRACTED_JAR
+
+for SQL_JAR in $SQL_JARS_DIR/*.jar; do
+ echo "Checking SQL JAR: $SQL_JAR"
+ unzip $SQL_JAR -d $EXTRACTED_JAR > /dev/null
+
+ # check for proper shading
+ for EXTRACTED_FILE in $(find $EXTRACTED_JAR -type f); do
+
+ if ! [[ $EXTRACTED_FILE = "$EXTRACTED_JAR/org/apache/flink"* ]] && \
+ ! [[ $EXTRACTED_FILE = "$EXTRACTED_JAR/META-INF"* ]] && \
+ ! [[ $EXTRACTED_FILE = "$EXTRACTED_JAR/LICENSE"* ]] && \
+ ! [[ $EXTRACTED_FILE = "$EXTRACTED_JAR/NOTICE"* ]] ; then
+ echo "Bad file in JAR: $EXTRACTED_FILE"
+ exit 1
+ fi
+ done
+
+ # check for proper proper factory
+ if [ ! -f
$EXTRACTED_JAR/META-INF/services/org.apache.flink.table.factories.TableFactory
]; then
+ echo "No table factory found in JAR: $SQL_JAR"
+ exit 1
+ fi
+
+ # clean up
+ rm -r $EXTRACTED_JAR/*
+done
+
+################################################################################
+# Run a table program
+################################################################################
+
+echo "Testing table program..."
+
+function sql_cleanup() {
+ # don't call ourselves again for another signal interruption
+ trap "exit -1" INT
+ # don't call ourselves again for normal exit
+ trap "" EXIT
+
+ stop_kafka_cluster
+
+ stop_cluster
+ stop_all_taskmanagers
+}
+trap sql_cleanup INT
+trap sql_cleanup EXIT
+
+# prepare Kafka
+echo "Preparing Kafka..."
+
+setup_kafka_dist
+
+start_kafka_cluster
+
+create_kafka_topic 1 1 test-input
Review comment:
rename to `test-json` and `test-avro`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> End-to-end test: SQL Client with unified source/sink/format
> -----------------------------------------------------------
>
> Key: FLINK-9833
> URL: https://issues.apache.org/jira/browse/FLINK-9833
> Project: Flink
> Issue Type: Sub-task
> Components: Table API & SQL
> Reporter: Timo Walther
> Assignee: Timo Walther
> Priority: Blocker
> Labels: pull-request-available
> Fix For: 1.6.0
>
>
> After FLINK-8858 is resolved we can add an end-to-end test for the SQL
> Client. The test should perform the following steps:
> - Put JSON data into Kafka
> - Submit and execute a {{INSERT INTO}} statement that reads from a Kafka
> connector with JSON format, does some ETL, and writes to Kafka with Avro
> format
> - Validate Avro data
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)