[ 
https://issues.apache.org/jira/browse/KAFKA-10490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tom Bentley updated KAFKA-10490:
--------------------------------
    Labels: needs-kip  (was: )

> Make constructors public for Admin API value objects
> ----------------------------------------------------
>
>                 Key: KAFKA-10490
>                 URL: https://issues.apache.org/jira/browse/KAFKA-10490
>             Project: Kafka
>          Issue Type: Improvement
>          Components: clients
>    Affects Versions: 2.6.0
>            Reporter: Noa Resare
>            Priority: Minor
>              Labels: needs-kip
>
> Developers writing automation that uses the {{Admin}} API will in many cases 
> want to create a mock and configure that mock to return the value objects 
> that is expected to be able to test other pieces of functionality in a 
> controlled way.
> However, since the constructors in the value objects that the various API 
> endpoints return are either {{protected}} or the default access level, 
> instantiating such value objects takes needs to use some convoluted trick to 
> create instances (either mock them with a mocking framework, use reflection 
> magic or create a helper method in the same package as they appear).
> Please consider updating the constructor signatures and make them public and 
> in doing so encourage good testing practices everywhere.
> Here are some examples of classes affected by this:
>  * CreateTopicsResult
>  * DeleteTopicsResult
>  * ListTopicsResult
>  * DescribeTopicsResult
>  * DescribeClusterResult
>  * DescribeAclsResult
>  * CreateAclsResul
>  * DeleteAclsResult
>  * DescribeConfigsResult
>  * AlterConfigsResult
>  * AlterReplicaLogDirsResult
>  * DescribeLogDirsResult
>  * DescribeReplicaLogDirsResult
>  * CreatePartitionsResult
>  * CreateDelegationTokenResult
>  * RenewDelegationTokenResult
>  * ExpireDelegationTokenResult
>  * DescribeDelegationTokenResult
>  * ...and so on



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to