Skip to content

Commit 0bf0033

Browse files
MINOR: add assertion about groupEpoch and targetAssignmentEpoch to testConsumerGroups (#18203)
Reviewers: David Jacot <[email protected]>, Chia-Ping Tsai <[email protected]>
1 parent dfc07e0 commit 0bf0033

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1938,8 +1938,13 @@ class PlaintextAdminIntegrationTest extends BaseAdminIntegrationTest {
19381938
// Test that we can get information about the test consumer group.
19391939
assertTrue(describeWithFakeGroupResult.describedGroups().containsKey(testGroupId))
19401940
var testGroupDescription = describeWithFakeGroupResult.describedGroups().get(testGroupId).get()
1941-
assertEquals(groupType == GroupType.CLASSIC, testGroupDescription.groupEpoch.isEmpty)
1942-
assertEquals(groupType == GroupType.CLASSIC, testGroupDescription.targetAssignmentEpoch.isEmpty)
1941+
if (groupType == GroupType.CLASSIC) {
1942+
assertTrue(testGroupDescription.groupEpoch.isEmpty)
1943+
assertTrue(testGroupDescription.targetAssignmentEpoch.isEmpty)
1944+
} else {
1945+
assertEquals(Optional.of(3), testGroupDescription.groupEpoch)
1946+
assertEquals(Optional.of(3), testGroupDescription.targetAssignmentEpoch)
1947+
}
19431948

19441949
assertEquals(testGroupId, testGroupDescription.groupId())
19451950
assertFalse(testGroupDescription.isSimpleConsumerGroup)

0 commit comments

Comments
 (0)