MINOR: Allow Block.resetBlockLatch to release blocked operation for end-of-test cleanup#14987
Closed
gharris1727 wants to merge 1 commit intoapache:trunkfrom
Closed
MINOR: Allow Block.resetBlockLatch to release blocked operation for end-of-test cleanup#14987gharris1727 wants to merge 1 commit intoapache:trunkfrom
gharris1727 wants to merge 1 commit intoapache:trunkfrom
Conversation
…est cleanup Signed-off-by: Greg Harris <greg.harris@aiven.io>
3 tasks
| blockLatch.countDown(); | ||
| } | ||
| blockLatch = new CountDownLatch(1); | ||
| clearLatch = new CountDownLatch(1); |
Contributor
There was a problem hiding this comment.
Thanks @gharris1727 - I had a question regarding lines 410 to 412.
When is it used and do we need to do the same for clearLatch ?
Contributor
|
I believe this is also addressed in #12290? |
Contributor
Author
|
Closing in favor of #12290 |
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.
The kafka.utils.TestUtils.verifyNoUnexpectedThreads method used before and after core tests finds threads leaked by these tests. If these tests run before core tests, then those tests will all fail this assertion.
Instead of leaving the blocked connectors blocking indefinitely, they should block just long enough for the test to verify the desired behavior. After the test is complete, the test should signal to the blocked connector to exit the block and return control to the framework, which can then do it's cancellation operations.
In the future we can augment the tests to verify the behavior of the thread after cancellation by triggering the reset before the end of the test.
Committer Checklist (excluded from commit message)