kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-6363) Use MockAdminClient for any unit tests that depend on AdminClient
Date Mon, 01 Jan 2018 12:58:00 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-6363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16307433#comment-16307433

ASF GitHub Bot commented on KAFKA-6363:

h314to opened a new pull request #4371: KAFKA-6363: Use MockAdminClient for any unit tests
that depend on Adm…
URL: https://github.com/apache/kafka/pull/4371
   * Implement MockAdminClient.deleteTopics
   * Use MockAdminClient instead of MockKafkaAdminClientEnv in StreamsResetterTest
   * Rename MockKafkaAdminClientEnv to AdminClientUnitTestEnv
   * Use MockAdminClient instead of MockKafkaAdminClientEnv in TopicAdminTest
   * Rename KafkaAdminClient to AdminClientUnitTestEnv in KafkaAdminClientTest.java
   * Migrate StreamThreadTest to MockAdminClient
   *More detailed description of your change,
   if necessary. The PR title and PR message become
   the squashed commit message, so use a separate
   comment to ping reviewers.*
   *Summary of testing strategy (including rationale)
   for the feature or bug fix. Unit and/or integration
   tests are expected for any behaviour change and
   system tests should be considered for larger changes.*
   ### 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 GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> Use MockAdminClient for any unit tests that depend on AdminClient
> -----------------------------------------------------------------
>                 Key: KAFKA-6363
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6363
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Guozhang Wang
>              Labels: newbie
> Today we have a few unit tests other than KafkaAdminClientTest that relies on MockKafkaAdminClientEnv.
> About this class and MockKafkaAdminClientEnv, my thoughts:
> 1. MockKafkaAdminClientEnv is actually using a MockClient for the inner KafkaClient;
it should be only used for the unit test of KafkaAdminClient itself.
> 2. For any other unit tests on classes that depend on AdminClient, we should be using
the MockAdminClient that mocks the whole AdminClient.
> So I suggest 1) in TopicAdminTest use MockAdminClient instead; 2) in KafkaAdminClientTest
use MockClient and added a new static constructor that takes a KafkaClient; 3) remove the

This message was sent by Atlassian JIRA

View raw message