-
Notifications
You must be signed in to change notification settings - Fork 234
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
[#3897] fix(python-test): Check Gravitino server status before running python test in embedded mode. #3898
Conversation
fun gravitinoServer(operation: String) { | ||
val process = ProcessBuilder("${project.rootDir.path}/distribution/package/bin/gravitino.sh", operation).start() | ||
val exitCode = process.waitFor() | ||
if (exitCode == 0) { | ||
val currentContext = process.inputStream.bufferedReader().readText() | ||
if (operation == "start") { | ||
waitForPort(8090) |
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 need to try to catch throw RuntimeException("Timed out waiting for port $port to be available")
in here?
try {
waitForPort(8090)
}
catch Exception()....
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.
Let me see
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 have added the exception from lines 33 to 34.
...ion-test-common/src/test/java/com/datastrato/gravitino/integration/test/util/AbstractIT.java
Outdated
Show resolved
Hide resolved
...ion-test-common/src/test/java/com/datastrato/gravitino/integration/test/util/AbstractIT.java
Outdated
Show resolved
Hide resolved
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.
Fix the Python issue, Why do we need to modify the java test code?
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 changed the logic regarding checking the Gravitino server from TCP to HTTP by the way
…running python test in embedded mode. (apache#3898) ### What changes were proposed in this pull request? Add check logic to ensure that the Gravitino server is ready to serve. ### Why are the changes needed? To make the python integration-test more stable. Fix: apache#3897 Fix: apache#3832 Fix: apache#3934 ### Does this PR introduce _any_ user-facing change? N/A ### How was this patch tested? CI and test locally.
…running python test in embedded mode. (apache#3898) ### What changes were proposed in this pull request? Add check logic to ensure that the Gravitino server is ready to serve. ### Why are the changes needed? To make the python integration-test more stable. Fix: apache#3897 Fix: apache#3832 Fix: apache#3934 ### Does this PR introduce _any_ user-facing change? N/A ### How was this patch tested? CI and test locally.
What changes were proposed in this pull request?
Add check logic to ensure that the Gravitino server is ready to serve.
Why are the changes needed?
To make the python integration-test more stable.
Fix: #3897
Fix: #3832
Does this PR introduce any user-facing change?
N/A
How was this patch tested?
CI and test locally.