C0urante opened a new pull request, #15302: URL: https://github.com/apache/kafka/pull/15302
[Jira 1](https://issues.apache.org/jira/browse/KAFKA-15524), [Jira 2](https://issues.apache.org/jira/browse/KAFKA-15917) In some rare cases, our integration tests observe that tasks are up and running for our sink connectors, and issue a subsequent request to stop the connector, before the consumers of these tasks have had a chance to form/join a group. When this happens, requests to alter/reset the offsets for the connector actually succeed, since the group either doesn't exist, or is completely empty. As a quick fix, we can wait for offsets to be committed for the connector before stopping it and attempting to modify its offsets. This goes a bit further than necessary (we should only have to wait for at least one task's consumer to have formed/joined a group), but off the top of my head it was the cleanest and briefest way to guarantee that a group had been formed. It also makes a little more sense in the context of the test, since there's not much use in modifying connector offsets when none exist yet. Opening as a draft; will wait for CI to complete before marking ready for review. ### 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org