-
Notifications
You must be signed in to change notification settings - Fork 14k
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
KAFKA-15705: Add integration tests for Heartbeat API and GroupLeave API #14656
KAFKA-15705: Add integration tests for Heartbeat API and GroupLeave API #14656
Conversation
core/src/test/scala/unit/kafka/server/LeaveGroupRequestTest.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dongnuo123 Thanks for the PR. I left some comments.
core/src/test/scala/unit/kafka/server/HeartbeatRequestTest.scala
Outdated
Show resolved
Hide resolved
core/src/test/scala/unit/kafka/server/HeartbeatRequestTest.scala
Outdated
Show resolved
Hide resolved
core/src/test/scala/unit/kafka/server/LeaveGroupRequestTest.scala
Outdated
Show resolved
Hide resolved
core/src/test/scala/unit/kafka/server/GroupCoordinatorBaseRequestTest.scala
Outdated
Show resolved
Hide resolved
core/src/test/scala/unit/kafka/server/GroupCoordinatorBaseRequestTest.scala
Outdated
Show resolved
Hide resolved
core/src/test/scala/unit/kafka/server/LeaveGroupRequestTest.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dongnuo123 Thanks for the update. I left two small comments.
core/src/test/scala/unit/kafka/server/HeartbeatRequestTest.scala
Outdated
Show resolved
Hide resolved
core/src/test/scala/unit/kafka/server/GroupCoordinatorBaseRequestTest.scala
Outdated
Show resolved
Hide resolved
core/src/test/scala/unit/kafka/server/GroupCoordinatorBaseRequestTest.scala
Outdated
Show resolved
Hide resolved
TestUtils.waitUntilTrue(() => { | ||
val described = describeGroups(groupIds = List("grp"), version = ApiKeys.DESCRIBE_GROUPS.latestVersion(isUnstableApiEnabled)) | ||
GenericGroupState.PREPARING_REBALANCE.toString == described.head.groupState | ||
}, msg = s"The group is not in PREPARING_REBALANCE state.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should just remove this and wrap the next HB in waitUntilTrue. Have you considered it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't work because somehow the code in the previous future tend to be executed later than the following code, so I have to set a waitUntilTrue or sleep for a while to make sure the request in the future is processed first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
…PI (apache#14656) Reviewers: David Jacot <djacot@confluent.io>
…PI (apache#14656) Reviewers: David Jacot <djacot@confluent.io>
…PI (apache#14656) Reviewers: David Jacot <djacot@confluent.io>
This pr is based on #14589,
Adding integration tests for Heartbeat API and GroupLeave API.
JIRA
https://issues.apache.org/jira/browse/KAFKA-15705
Committer Checklist (excluded from commit message)