Skip to content

Commit

Permalink
MINOR: add assertion about groupEpoch and targetAssignmentEpoch to te…
Browse files Browse the repository at this point in the history
…stConsumerGroups (#18203)

Reviewers: David Jacot <[email protected]>, Chia-Ping Tsai <[email protected]>
  • Loading branch information
FrankYang0529 authored Dec 18, 2024
1 parent dfc07e0 commit 0bf0033
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1938,8 +1938,13 @@ class PlaintextAdminIntegrationTest extends BaseAdminIntegrationTest {
// Test that we can get information about the test consumer group.
assertTrue(describeWithFakeGroupResult.describedGroups().containsKey(testGroupId))
var testGroupDescription = describeWithFakeGroupResult.describedGroups().get(testGroupId).get()
assertEquals(groupType == GroupType.CLASSIC, testGroupDescription.groupEpoch.isEmpty)
assertEquals(groupType == GroupType.CLASSIC, testGroupDescription.targetAssignmentEpoch.isEmpty)
if (groupType == GroupType.CLASSIC) {
assertTrue(testGroupDescription.groupEpoch.isEmpty)
assertTrue(testGroupDescription.targetAssignmentEpoch.isEmpty)
} else {
assertEquals(Optional.of(3), testGroupDescription.groupEpoch)
assertEquals(Optional.of(3), testGroupDescription.targetAssignmentEpoch)
}

assertEquals(testGroupId, testGroupDescription.groupId())
assertFalse(testGroupDescription.isSimpleConsumerGroup)
Expand Down

0 comments on commit 0bf0033

Please sign in to comment.