Added test for increase in LearnerHandler Queue despite shutdown invocation#127
Open
mudit-saxena wants to merge 2 commits intomasterfrom
Open
Added test for increase in LearnerHandler Queue despite shutdown invocation#127mudit-saxena wants to merge 2 commits intomasterfrom
mudit-saxena wants to merge 2 commits intomasterfrom
Conversation
9c11e0e to
a2e07c8
Compare
adityaagg09
previously approved these changes
Oct 14, 2025
Collaborator
adityaagg09
left a comment
There was a problem hiding this comment.
LGTM,
We should also attach the jira ticket in the description
* 1. A background thread continuously adds packets to the learner's queue * 2. Shutdown is initiated, which clears the queue and adds proposalOfDeath * 3. Shutdown then blocks on socket.close() (mocked to take 5 seconds) * 4. During the socket close wait, the background thread continues adding packets * 5. The queue grows even though shutdown has been initiated
a2e07c8 to
0d9ade3
Compare
The base branch was changed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary - Tests that the packet queue can grow during a slow/blocked shutdown process.
This test verifies a specific race condition scenario:
This simulates real-world scenarios where:
Tests
The following tests are written for this issue:
(List the names of added unit/integration tests)
Added test
The following is the result of the "mvn test" command on the appropriate module:
(If CI test fails due to known issue, please specify the issue and test PR locally. Then copy & paste the result of "mvn test" to here.)
Changes that Break Backward Compatibility (Optional)
My PR contains changes that break backward compatibility or previous assumptions for certain methods or API. They include:
(Consider including all behavior changes for public methods or API. Also include these changes in merge description so that other developers are aware of these changes. This allows them to make relevant code changes in feature branches accounting for the new method/API behavior.)
NA
Documentation (Optional)
In case of new functionality, my PR adds documentation in the following wiki page:
(Link the GitHub wiki you added)
NA