-
Notifications
You must be signed in to change notification settings - Fork 378
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
[#2992] improvement(PyClient): Fix unstable Python client integration test #2994
Conversation
fileset_propertie_value2: str = "fileset_propertie_value2" | ||
fileset_properties: Dict[str, str] = {fileset_propertie_key1: fileset_propertie_value1, | ||
fileset_propertie_key2: fileset_propertie_value2} | ||
fileset_new_name = fileset_name + "_new" |
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.
It is better that you can add a random prefix to all the names so that you will not fail for any case, like what we did in Java IT?
@xunliu |
echo "Use Python version ${pythonVersion} to test the Python client." | ||
# Start Gravitino server and set the environment variable | ||
./distribution/package/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.
With this manual startUp
step, how do we test in local environment using gradle?
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.
- Test Principle: Every Python ITs class base on the
IntegrationTestEnv
,IntegrationTestEnv
will automatic start and stop Gravitino server to support ITs, But when you run multiple ITs class at same time, The first test class that finishes running will shut down the Gravitino server, which will cause other test classes to fail if they can't connect to the Gravitino server. - Run test in the IDE: Through
IntegrationTestEnv
class automatic start and stop Gravitino server to support ITs. - Run test in the Github Action: Manual start and stop Gravitino server, and set
EXTERNAL_START_GRAVITINO
environment variable - Run test in the Gradle command
:client:client-python:test
: Gradle automatic start and stop Gravitino server, and setEXTERNAL_START_GRAVITINO
environment variable.
I will create a document to description this in the next PR.
- name: Python Client Integration Test | ||
id: integrationTest | ||
env: | ||
EXTERNAL_START_GRAVITINO: true |
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 change to “START_EXTERNAL_GRAVITINO”
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.
DONE.
val skipPyClientITs = project.hasProperty("skipPyClientITs") | ||
if (!skipPyClientITs) { | ||
doFirst { | ||
gravitinoServer("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.
Do we still need to start Gravitino manually if it is started manually in CI?
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, You are right, I removed this code.
doLast { | ||
gravitinoServer("stop") | ||
doLast { | ||
gravitinoServer("stop") |
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.
Also here.
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.
I removed this code.
@jerryshao Please help me review this PR, Thanks. |
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.
LGTM, thanks @xunliu for your fix.
…ration test (apache#2994) ### What changes were proposed in this pull request? 1. Add `skipPyClientITs` param in Gradle build script. Let's Python client integration test not running in the backend ITs 2. Combined Gradle build command of Python client test and integration test 3. improvement FilesetCatalog integration test codes. 4. Test mode + Test Principle: Every Python ITs class base on the `IntegrationTestEnv`, `IntegrationTestEnv` will automatic start and stop Gravitino server to support ITs, But when you run multiple ITs class at same time, The first test class that finishes running will shut down the Gravitino server, which will cause other test classes to fail if they can't connect to the Gravitino server. + Run test in the IDE: Through `IntegrationTestEnv` class automatic start and stop Gravitino server to support ITs. + Run test in the Github Action: Manual start and stop Gravitino server, and set `EXTERNAL_START_GRAVITINO` environment variable + Run test in the Gradle command `:client:client-python:test`: Gradle automatic start and stop Gravitino server, and set `EXTERNAL_START_GRAVITINO` environment variable. ### Why are the changes needed? Fix: apache#2292 ### Does this PR introduce _any_ user-facing change? N/A ### How was this patch tested? Through CI check.
What changes were proposed in this pull request?
Add
skipPyClientITs
param in Gradle build script. Let's Python client integration test not running in the backend ITsCombined Gradle build command of Python client test and integration test
improvement FilesetCatalog integration test codes.
Test mode
IntegrationTestEnv
,IntegrationTestEnv
will automatic start and stop Gravitino server to support ITs, But when you run multiple ITs class at same time, The first test class that finishes running will shut down the Gravitino server, which will cause other test classes to fail if they can't connect to the Gravitino server.IntegrationTestEnv
class automatic start and stop Gravitino server to support ITs.EXTERNAL_START_GRAVITINO
environment variable:client:client-python:test
: Gradle automatic start and stop Gravitino server, and setEXTERNAL_START_GRAVITINO
environment variable.Why are the changes needed?
Fix: #2992
Does this PR introduce any user-facing change?
N/A
How was this patch tested?
Through CI check.