kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guozhang Wang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-6363) Use MockAdminClient for any unit tests that depend on AdminClient
Date Tue, 02 Jan 2018 16:50:00 GMT

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

Guozhang Wang commented on KAFKA-6363:

[~h314to] I have added you to the contributor list.

> 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
>            Assignee: Filipe Agapito
>              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