-
Notifications
You must be signed in to change notification settings - Fork 319
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
[#5071] Improvement (test): Add integration tests for Trino cascading queries #5073
Conversation
@@ -76,7 +76,7 @@ jobs: | |||
|
|||
- name: Package Gravitino | |||
run: | | |||
./gradlew compileDistribution -x test -PjdkVersion=${{ matrix.java-version }} | |||
./gradlew build compileDistribution -x test -PjdkVersion=${{ matrix.java-version }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to add the build task? I believe the build task is included in compileDistribution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the compileDistribution
task does not build the Trino connector
#create test metalake | ||
counter=0 | ||
while [ $counter -le 30 ]; do | ||
sleep 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better move this line to L53.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to pause for a moment because the Gravitino server has not completed startup.
cp -r /opt/gravitino-server /tmp/gravitino-server | ||
rm -fr /tmp/gravitino-server/logs | ||
rm -fr /tmp/gravitino-server/data | ||
/tmp/gravitino-server/bin/gravitino.sh start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When will you stop the Gravitino server? I haven't noticed such logic in the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Gravitino server was stopped by the container shutdown.
# under the License. | ||
|
||
connector.name=trino | ||
connection-url=jdbc:trino://trino-remote:8080/tpcds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${trino-remote-address}:${trino-remote-port}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That URL is a valid connection-url used by the Docker Compose environment.
@@ -76,7 +76,7 @@ jobs: | |||
|
|||
- name: Package Gravitino | |||
run: | | |||
./gradlew compileDistribution -x test -PjdkVersion=${{ matrix.java-version }} | |||
./gradlew compileDistribution compileTrinoConnector -x test -PjdkVersion=${{ matrix.java-version }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the task compileTrinoConnector
NOT included in compileDistribution
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the compileTrinoConnector
task does not include compileDistribution
5fe7502
to
4b068d9
Compare
397a16a
to
f194abb
Compare
@@ -87,6 +87,7 @@ jobs: | |||
run: | | |||
./gradlew -PskipTests -PtestMode=embedded -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false :trino-connector:integration-test:test | |||
./gradlew -PskipTests -PtestMode=deploy -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false :trino-connector:integration-test:test | |||
trino-connector/integration-test/trino-test-tools/run_test.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference between this test script and the above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script uses a different test set and testing environment to test the Trino connector. It can also specify a custom test set and testing environment for any test cases. Additionally, the above command can be modified to use the script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"a different test set" means tpcds and tpch, right? If so, plz add comment on it otherwise we don't know why run the script individually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"a different test set" means the test set for Trino cascading queries. Now the test set only includes TPCH and TCPDS queries.
} | ||
|
||
# Specific functions for each driver or bundle | ||
download_mysql_jar() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where was this function called?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
launch.sh
# Specific functions for each driver or bundle | ||
download_mysql_jar() { | ||
download_jar "mysql-connector-java-8.0.26.jar" \ | ||
"https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.26/mysql-connector-java-8.0.26.jar" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the version is rectified, we can validate its integrity by verifying the MD5 checksum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There generally shouldn’t be any issues here. If an issue does occur, the download script will raise an error, exit execution, and output the error message.
Let’s fix it later if any issues arise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not reuse the docker-compose in integration-test-common
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
integration-test-common
is a single Trino cluster environment; it does not test Trino cascading queries. The new Docker Compose setup includes two Trino clusters to test cascading queries in Trino.
What changes were proposed in this pull request?
Add integration tests for Trino cascading queries
Why are the changes needed?
Fix: #5071
Does this PR introduce any user-facing change?
NO
How was this patch tested?
New integration testers