You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Muralidhar Basani <mu...@aiven.io.INVALID> on 2024/06/06 09:22:40 UTC

Re: [DISCUSS] KIP-1045 Decide MockAdminClient to move to public api or not

Hi,
I have updated this KIP
<https://cwiki.apache.org/confluence/display/KAFKA/KIP-1045%3A+Move+MockAdminClient+to+public+api>
to
a proposal now.

Hoping to get any thoughts or opinions.

- Moving MockAdminClient to the src folder and making it public making it
similar to MockProducer and MockConsumer.

Thanks,
Murali

On Mon, May 20, 2024 at 10:51 PM Muralidhar Basani <
muralidhar.basani@aiven.io> wrote:

> Hi all,
>
> Any thoughts on this ? In my view, it helps developers in having an end to
> end testing framework embedded into their applications, right from mocking
> of creating topics, acls itself.
> Even though creation and listing of these are done during design time,
> automating these could be beneficial.
>
> MockProducer and MockConsumer are part of the public api already.
>
> Thanks,
> Murali
>
> On Thu, May 16, 2024 at 11:10 AM Muralidhar Basani <
> muralidhar.basani@aiven.io> wrote:
>
>> Hello,
>>
>> As part of this KIP, I would like to take your opinions in
>> moving MockAdminClient to the src folder, making it public, would it be
>> beneficial or not.
>>
>> KIP-1045
>> <https://cwiki.apache.org/confluence/display/KAFKA/KIP-1045%3A+Decide+MockAdminClient+to+move+to+public+api+or+not>
>>
>> Currently MockConsumer and MockProducer are part of the public API. They
>> are useful for developers wanting to test their applications. On the other
>> hand MockAdminClient is not part of the public API (it's under test). We
>> should consider moving it to src so users can also easily test applications
>> that depend on Admin. (Mentioned by Mickael Maison in KAFKA-15258
>> <https://issues.apache.org/jira/browse/KAFKA-15258>)
>>
>> Thanks,
>> Murali
>>
>> Muralidhar Basani
>> Staff Software Engineer, Aiven
>> muralidhar.basani@aiven.io
>>
>>

Re: [DISCUSS] KIP-1045 Decide MockAdminClient to move to public api or not

Posted by Muralidhar Basani <mu...@aiven.io.INVALID>.
Hi Jiang,

Thank you for your response. I agree that people might use it as valid code
for creating topics. I don't have a compelling argument beyond the benefits
it offers developers in certain use cases and maintaining consistency with
MockProducer and MockConsumer.

If I don't receive any further feedback from others, I will withdraw this
KIP in a week.

Thanks,
Murali



On Thu, Jun 6, 2024 at 12:15 PM jiang dou <du...@gmail.com> wrote:

> hi
>
> Thank you KIP, but I don't agree with putting mock methods or classes into
> src  folder ,
> Unless there is a reason to put the mock class in the src folder (for
> example: multi-threaded execution cannot be verified under @Test)
> Placing the mock class under src will increase maintenance costs, and some
> people may even use it as valid code, increasing development difficulty.
> If possible, I would recommend moving MockConsumer and MockProducer to the
> test src  folder   .
>
> Muralidhar Basani <mu...@aiven.io.invalid> 于2024年6月6日周四
> 17:23写道:
>
> > Hi,
> > I have updated this KIP
> > <
> >
> https://cwiki.apache.org/confluence/display/KAFKA/KIP-1045%3A+Move+MockAdminClient+to+public+api
> > >
> > to
> > a proposal now.
> >
> > Hoping to get any thoughts or opinions.
> >
> > - Moving MockAdminClient to the src folder and making it public making it
> > similar to MockProducer and MockConsumer.
> >
> > Thanks,
> > Murali
> >
> > On Mon, May 20, 2024 at 10:51 PM Muralidhar Basani <
> > muralidhar.basani@aiven.io> wrote:
> >
> > > Hi all,
> > >
> > > Any thoughts on this ? In my view, it helps developers in having an end
> > to
> > > end testing framework embedded into their applications, right from
> > mocking
> > > of creating topics, acls itself.
> > > Even though creation and listing of these are done during design time,
> > > automating these could be beneficial.
> > >
> > > MockProducer and MockConsumer are part of the public api already.
> > >
> > > Thanks,
> > > Murali
> > >
> > > On Thu, May 16, 2024 at 11:10 AM Muralidhar Basani <
> > > muralidhar.basani@aiven.io> wrote:
> > >
> > >> Hello,
> > >>
> > >> As part of this KIP, I would like to take your opinions in
> > >> moving MockAdminClient to the src folder, making it public, would it
> be
> > >> beneficial or not.
> > >>
> > >> KIP-1045
> > >> <
> >
> https://cwiki.apache.org/confluence/display/KAFKA/KIP-1045%3A+Decide+MockAdminClient+to+move+to+public+api+or+not
> > >
> > >>
> > >> Currently MockConsumer and MockProducer are part of the public API.
> They
> > >> are useful for developers wanting to test their applications. On the
> > other
> > >> hand MockAdminClient is not part of the public API (it's under test).
> We
> > >> should consider moving it to src so users can also easily test
> > applications
> > >> that depend on Admin. (Mentioned by Mickael Maison in KAFKA-15258
> > >> <https://issues.apache.org/jira/browse/KAFKA-15258>)
> > >>
> > >> Thanks,
> > >> Murali
> > >>
> > >> Muralidhar Basani
> > >> Staff Software Engineer, Aiven
> > >> muralidhar.basani@aiven.io
> > >>
> > >>
> >
>

Re: [DISCUSS] KIP-1045 Decide MockAdminClient to move to public api or not

Posted by jiang dou <du...@gmail.com>.
hi

Thank you KIP, but I don't agree with putting mock methods or classes into
src  folder ,
Unless there is a reason to put the mock class in the src folder (for
example: multi-threaded execution cannot be verified under @Test)
Placing the mock class under src will increase maintenance costs, and some
people may even use it as valid code, increasing development difficulty.
If possible, I would recommend moving MockConsumer and MockProducer to the
test src  folder   .

Muralidhar Basani <mu...@aiven.io.invalid> 于2024年6月6日周四 17:23写道:

> Hi,
> I have updated this KIP
> <
> https://cwiki.apache.org/confluence/display/KAFKA/KIP-1045%3A+Move+MockAdminClient+to+public+api
> >
> to
> a proposal now.
>
> Hoping to get any thoughts or opinions.
>
> - Moving MockAdminClient to the src folder and making it public making it
> similar to MockProducer and MockConsumer.
>
> Thanks,
> Murali
>
> On Mon, May 20, 2024 at 10:51 PM Muralidhar Basani <
> muralidhar.basani@aiven.io> wrote:
>
> > Hi all,
> >
> > Any thoughts on this ? In my view, it helps developers in having an end
> to
> > end testing framework embedded into their applications, right from
> mocking
> > of creating topics, acls itself.
> > Even though creation and listing of these are done during design time,
> > automating these could be beneficial.
> >
> > MockProducer and MockConsumer are part of the public api already.
> >
> > Thanks,
> > Murali
> >
> > On Thu, May 16, 2024 at 11:10 AM Muralidhar Basani <
> > muralidhar.basani@aiven.io> wrote:
> >
> >> Hello,
> >>
> >> As part of this KIP, I would like to take your opinions in
> >> moving MockAdminClient to the src folder, making it public, would it be
> >> beneficial or not.
> >>
> >> KIP-1045
> >> <
> https://cwiki.apache.org/confluence/display/KAFKA/KIP-1045%3A+Decide+MockAdminClient+to+move+to+public+api+or+not
> >
> >>
> >> Currently MockConsumer and MockProducer are part of the public API. They
> >> are useful for developers wanting to test their applications. On the
> other
> >> hand MockAdminClient is not part of the public API (it's under test). We
> >> should consider moving it to src so users can also easily test
> applications
> >> that depend on Admin. (Mentioned by Mickael Maison in KAFKA-15258
> >> <https://issues.apache.org/jira/browse/KAFKA-15258>)
> >>
> >> Thanks,
> >> Murali
> >>
> >> Muralidhar Basani
> >> Staff Software Engineer, Aiven
> >> muralidhar.basani@aiven.io
> >>
> >>
>