You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "AnGg98 (via GitHub)" <gi...@apache.org> on 2025/12/02 11:54:40 UTC

[PR] MINOR: Deduplicate common test helpers in group-coordinator tests [kafka]

AnGg98 opened a new pull request, #21047:
URL: https://github.com/apache/kafka/pull/21047

   Refactor group-coordinator unit tests code to reduce duplication and align with test structure used in other group-coordinator tests.


-- 
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: Deduplicate common test helpers in group-coordinator tests [kafka]

Posted by "AnGg98 (via GitHub)" <gi...@apache.org>.
AnGg98 commented on code in PR #21047:
URL: https://github.com/apache/kafka/pull/21047#discussion_r2581184751


##########
core/src/test/scala/unit/kafka/server/GroupCoordinatorBaseRequestTest.scala:
##########
@@ -80,6 +80,22 @@ class GroupCoordinatorBaseRequestTest(cluster: ClusterInstance) {
     }
   }
 
+  protected def createTopicWithAdminRaw(

Review Comment:
   Using `createTopic` now



-- 
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: Deduplicate common test helpers in group-coordinator tests [kafka]

Posted by "dajac (via GitHub)" <gi...@apache.org>.
dajac merged PR #21047:
URL: https://github.com/apache/kafka/pull/21047


-- 
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: Deduplicate common test helpers in group-coordinator tests [kafka]

Posted by "dajac (via GitHub)" <gi...@apache.org>.
dajac commented on code in PR #21047:
URL: https://github.com/apache/kafka/pull/21047#discussion_r2580925943


##########
core/src/test/scala/unit/kafka/server/GroupCoordinatorBaseRequestTest.scala:
##########
@@ -80,6 +80,22 @@ class GroupCoordinatorBaseRequestTest(cluster: ClusterInstance) {
     }
   }
 
+  protected def createTopicWithAdminRaw(

Review Comment:
   We already have `createTopic` in this class. I wonder whether we could unify both. Have you checked by chance?



##########
core/src/test/scala/unit/kafka/server/ConsumerGroupDescribeRequestTest.scala:
##########
@@ -80,150 +80,145 @@ class ConsumerGroupDescribeRequestTest(cluster: ClusterInstance) extends GroupCo
     createOffsetsTopic()
 
     val admin = cluster.admin()

Review Comment:
   Do we still need it?



-- 
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: Deduplicate common test helpers in group-coordinator tests [kafka]

Posted by "AnGg98 (via GitHub)" <gi...@apache.org>.
AnGg98 commented on code in PR #21047:
URL: https://github.com/apache/kafka/pull/21047#discussion_r2581051500


##########
core/src/test/scala/unit/kafka/server/GroupCoordinatorBaseRequestTest.scala:
##########
@@ -80,6 +80,22 @@ class GroupCoordinatorBaseRequestTest(cluster: ClusterInstance) {
     }
   }
 
+  protected def createTopicWithAdminRaw(

Review Comment:
   We could use `createTopic` as well I believe, but that method waits for the metadata to propagate to all brokers. The helper we are introducing here (extracted from existing test usage) simply creates the topic and returns without waiting.



-- 
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: Deduplicate common test helpers in group-coordinator tests [kafka]

Posted by "AnGg98 (via GitHub)" <gi...@apache.org>.
AnGg98 commented on code in PR #21047:
URL: https://github.com/apache/kafka/pull/21047#discussion_r2581060645


##########
core/src/test/scala/unit/kafka/server/ConsumerGroupDescribeRequestTest.scala:
##########
@@ -80,150 +80,145 @@ class ConsumerGroupDescribeRequestTest(cluster: ClusterInstance) extends GroupCo
     createOffsetsTopic()
 
     val admin = cluster.admin()

Review Comment:
   Ah, I missed removing it earlier. I have removed it now.



-- 
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