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

[CELEBORN-1794] Fix TestCongestionController occasional failing #3017

Closed
wants to merge 2 commits into from

Conversation

zaynt4606
Copy link
Contributor

@zaynt4606 zaynt4606 commented Dec 20, 2024

Why are the changes needed?

There are a small probability of the TestCongestionController test failing.

image

That is because the checkService will excute once it was init, which can cause a multithreading conflict with the test code.

image

What changes were proposed in this pull request?

Fix ut bug.
In fact, shutDownCheckService still wont prevent the checkService from excuting at once but can make the main testing thread waiting for it to shutDown.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

manual test.

Copy link
Contributor

@onebox-li onebox-li left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM.

@@ -298,6 +299,11 @@ public void close() {
this.producedBufferStatusHub.clear();
}

@VisibleForTesting
public void shutDownCheckService() {
this.checkService.shutdownNow();
Copy link
Contributor

Choose a reason for hiding this comment

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

Use ThreadUtils.shutdown

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done~

Copy link
Contributor

@RexXiong RexXiong left a comment

Choose a reason for hiding this comment

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

LGTM, merge to main(v0.6.0)

@RexXiong RexXiong closed this in 406ceb6 Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants