Skip to content

Conversation

@majetideepak
Copy link
Collaborator

@majetideepak majetideepak commented Oct 31, 2025

There is a small chance that the PortUtil might return available ports, but the ports get taken away before use.
Retry if this is the case.
Add a delay to allow the MinIO server to start. Without this, there is a risk of tests being flaky due to the server
not being available.

Fixes: #15304

@netlify
Copy link

netlify bot commented Oct 31, 2025

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 0f4c7ba
🔍 Latest deploy log https://app.netlify.com/projects/meta-velox/deploys/6904e271d8d6aa000865866a

@majetideepak majetideepak requested a review from czentgr October 31, 2025 16:20
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 31, 2025
@majetideepak majetideepak requested a review from JkSelf October 31, 2025 16:20
path.c_str());
} catch (const std::exception& e) {
VELOX_FAIL("Failed to launch Minio server: {}", e.what());
std::vector<int> ports = {9000, 65203};
Copy link
Collaborator

Choose a reason for hiding this comment

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

The initialization here seems unnecessary since the value will be overridden when getting the free ports.

} catch (const std::exception& e) {
VELOX_FAIL("Failed to launch Minio server: {}", e.what());
std::vector<int> ports = {9000, 65203};
int kMaxRetryCount = 5;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: constexpr auto kMaxRetryCount = 5;

while (retries++ < kMaxRetryCount) {
try {
// Create a stream to capture process output.
boost::process::ipstream out_stream;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: out_stream -> outStream

Copy link
Collaborator

@JkSelf JkSelf left a comment

Choose a reason for hiding this comment

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

@majetideepak Thanks for your fix. Leaving some comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky test S3FileSystemRegistrationTest.fileHandle

2 participants