You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "dongnuo123 (via GitHub)" <gi...@apache.org> on 2024/04/26 16:05:05 UTC
[PR] [Minor] Fix the flaky testConsumerGroupHeartbeatWithStableClassicGroup by sorting the topic partition list [kafka]
dongnuo123 opened a new pull request, #15816:
URL: https://github.com/apache/kafka/pull/15816
We are seeing flaky test in `testConsumerGroupHeartbeatWithStableClassicGroup` where the error is caused by the different ordering in the expected and actual values. The patch sorts the topic partition list in the records to fix the issue.
https://ci-builds.apache.org/blue/organizations/jenkins/Kafka%2Fkafka-pr/detail/PR-15698/11/tests/
### 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: Fix the flaky testConsumerGroupHeartbeatWithStableClassicGroup by sorting the topic partition list [kafka]
Posted by "dajac (via GitHub)" <gi...@apache.org>.
dajac merged PR #15816:
URL: https://github.com/apache/kafka/pull/15816
--
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: Fix the flaky testConsumerGroupHeartbeatWithStableClassicGroup by sorting the topic partition list [kafka]
Posted by "soarez (via GitHub)" <gi...@apache.org>.
soarez commented on code in PR #15816:
URL: https://github.com/apache/kafka/pull/15816#discussion_r1581824043
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/Assertions.java:
##########
@@ -244,6 +245,19 @@ private static void assertApiMessageAndVersionEquals(
fail("Failed deserialization: " + ex.getMessage());
}
assertEquals(expectedValue, actualValue);
+ } else if (actual.message() instanceof ConsumerGroupTargetAssignmentMemberValue) {
+ ConsumerGroupTargetAssignmentMemberValue expectedValue =
+ (ConsumerGroupTargetAssignmentMemberValue) expected.message().duplicate();
+ ConsumerGroupTargetAssignmentMemberValue actualValue =
+ (ConsumerGroupTargetAssignmentMemberValue) actual.message().duplicate();
+
+ expectedValue.topicPartitions().sort(
+ Comparator.comparing(ConsumerGroupTargetAssignmentMemberValue.TopicPartition::topicId)
+ );
+ actualValue.topicPartitions().sort(
+ Comparator.comparing(ConsumerGroupTargetAssignmentMemberValue.TopicPartition::topicId)
Review Comment:
The comparator can be extracted into a common variable.
--
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