This is an automated email from the ASF dual-hosted git repository.

chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 0bf0033d964 MINOR: add assertion about groupEpoch and 
targetAssignmentEpoch to testConsumerGroups (#18203)
0bf0033d964 is described below

commit 0bf0033d964bac2f1fcb4af670843c10c33187f1
Author: PoAn Yang <[email protected]>
AuthorDate: Wed Dec 18 08:05:09 2024 +0800

    MINOR: add assertion about groupEpoch and targetAssignmentEpoch to 
testConsumerGroups (#18203)
    
    Reviewers: David Jacot <[email protected]>, Chia-Ping Tsai 
<[email protected]>
---
 .../integration/kafka/api/PlaintextAdminIntegrationTest.scala    | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala 
b/core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala
index e62ffdf7ff7..81ae104f560 100644
--- 
a/core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala
+++ 
b/core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala
@@ -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)

Reply via email to