You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "gharris1727 (via GitHub)" <gi...@apache.org> on 2023/12/11 22:53:08 UTC
[PR] MINOR: Allow Block.resetBlockLatch to release blocked operation for end-of-test cleanup [kafka]
gharris1727 opened a new pull request, #14987:
URL: https://github.com/apache/kafka/pull/14987
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)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Allow Block.resetBlockLatch to release blocked operation for end-of-test cleanup [kafka]
Posted by "gharris1727 (via GitHub)" <gi...@apache.org>.
gharris1727 commented on PR #14987:
URL: https://github.com/apache/kafka/pull/14987#issuecomment-1852376741
Closing in favor of #12290
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Allow Block.resetBlockLatch to release blocked operation for end-of-test cleanup [kafka]
Posted by "gharris1727 (via GitHub)" <gi...@apache.org>.
gharris1727 closed pull request #14987: MINOR: Allow Block.resetBlockLatch to release blocked operation for end-of-test cleanup
URL: https://github.com/apache/kafka/pull/14987
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Allow Block.resetBlockLatch to release blocked operation for end-of-test cleanup [kafka]
Posted by "C0urante (via GitHub)" <gi...@apache.org>.
C0urante commented on PR #14987:
URL: https://github.com/apache/kafka/pull/14987#issuecomment-1852153148
I believe this is also addressed in https://github.com/apache/kafka/pull/12290?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Allow Block.resetBlockLatch to release blocked operation for end-of-test cleanup [kafka]
Posted by "ashwinpankaj (via GitHub)" <gi...@apache.org>.
ashwinpankaj commented on code in PR #14987:
URL: https://github.com/apache/kafka/pull/14987#discussion_r1423381159
##########
connect/runtime/src/test/java/org/apache/kafka/connect/integration/BlockingConnectorTest.java:
##########
@@ -406,6 +411,7 @@ public Block(String block) {
blockLatch.countDown();
}
blockLatch = new CountDownLatch(1);
+ clearLatch = new CountDownLatch(1);
Review 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 ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org