1u0 commented on a change in pull request #9368: [FLINK-13592][e2e] Fix 
hardcoded flink version in tpch end-to-end test.
URL: https://github.com/apache/flink/pull/9368#discussion_r310939084
 
 

 ##########
 File path: flink-end-to-end-tests/test-scripts/test_tpch.sh
 ##########
 @@ -31,7 +31,9 @@ echo "Generating test data..."
 
 TARGET_DIR="$END_TO_END_DIR/flink-tpch-test/target"
 TPCH_DATA_DIR="$END_TO_END_DIR/test-scripts/test-data/tpch"
-java -cp "$TARGET_DIR/flink-tpch-test-1.10-SNAPSHOT.jar:$TARGET_DIR/lib/*" 
org.apache.flink.table.tpch.TpchDataGenerator "$SCALE" "$TARGET_DIR"
+FLINK_VERSION=`ls 
"${END_TO_END_DIR}/../flink-table/flink-table-api-java/target" | sed -n 
"s/.*flink-table-api-java-\(.*\)-tests\.jar/\1/p" | uniq`
+
+java -cp "$TARGET_DIR/flink-tpch-test-"$FLINK_VERSION".jar:$TARGET_DIR/lib/*" 
org.apache.flink.table.tpch.TpchDataGenerator "$SCALE" "$TARGET_DIR"
 
 Review comment:
   The `flink-tpch-test-"$FLINK_VERSION".jar` is test only artifact. You can 
change the `flink-end-to-end-tests/flink-tpch-test/pom.xml` to produce the 
final build artifact **without** version in the name, instead of detecting the 
Flink version.
   
   For example, `flink-stream-sql-test` produces an artifact without version.
   
   _Side note:_ your version checking depends on some other artifact 
(`flink-table-api-java`), this can silently brake in the future.

----------------------------------------------------------------
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