Skip to content
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

Merged
merged 10 commits into from
Jun 21, 2024

Conversation

yuqi1129
Copy link
Contributor

@yuqi1129 yuqi1129 commented Jun 19, 2024

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.

@yuqi1129 yuqi1129 requested a review from xunliu June 19, 2024 02:34
@yuqi1129 yuqi1129 self-assigned this Jun 19, 2024
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)
Copy link
Member

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()....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me see

Copy link
Contributor Author

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.

@yuqi1129 yuqi1129 requested review from xunliu and FANNG1 June 21, 2024 06:32
Copy link
Member

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?

Copy link
Contributor Author

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

@yuqi1129 yuqi1129 requested review from xunliu and FANNG1 June 21, 2024 14:31
@FANNG1 FANNG1 merged commit cc5e67b into apache:main Jun 21, 2024
24 checks passed
mchades pushed a commit to mchades/gravitino that referenced this pull request Jun 24, 2024
…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.
shaofengshi pushed a commit to shaofengshi/gravitino that referenced this pull request Jun 24, 2024
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants