wuchong commented on a change in pull request #11396: 
[FLINK-16170][connectors/elasticsearch]SearchTemplateRequest 
ClassNotFoundException when use flink-sql-connector-elasticsearch7
URL: https://github.com/apache/flink/pull/11396#discussion_r393466630
 
 

 ##########
 File path: flink-end-to-end-tests/test-scripts/test_sql_client.sh
 ##########
 @@ -262,10 +271,66 @@ EOF
 JOB_ID=$($FLINK_DIR/bin/sql-client.sh embedded \
   --jar $KAFKA_SQL_JAR \
   --jar $JSON_SQL_JAR \
-  --jar $ELASTICSEARCH_SQL_JAR \
+  --jar $ELASTICSEARCH6_SQL_JAR \
   --jar $SQL_TOOLBOX_JAR \
   --environment $SQL_CONF \
-  --update "$SQL_STATEMENT_5" | grep "Job ID:" | sed 's/.* //g')
+  --update "$SQL_STATEMENT_3" | grep "Job ID:" | sed 's/.* //g')
 
 # 3 upsert results and 6 append results and 3 match_recognize results
 verify_result_line_number 12 "$ELASTICSEARCH_INDEX"
+
+###############################################################################
+# Test sql-connector-elasticsearch7
+###############################################################################
+echo "Executing SQL: Values -> Elasticsearch7 (upsert)"
+
+# prepare client_conf and sql statement
+ELASTICSEARCH_VERSION=7
+ELASTICSEARCH7_MAC_DOWNLOAD_URL='https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.1-darwin-x86_64.tar.gz'
+ELASTICSEARCH7_LINUX_DOWNLOAD_URL='https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.1-linux-x86_64.tar.gz'
+
+SQL_CONF_CONTENT=$(cat ${SQL_CONF})
+cat >> $SQL_CONF << EOF
+${SQL_CONF_CONTENT//version: 6/version: 7}
 
 Review comment:
   We can use "$ELASTICSEARCH_VERSION" in SQL_CONF to avoid content 
replacement. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to