You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by ignacio gioya <ig...@gmail.com> on 2020/06/10 23:26:34 UTC
Can't disable kafka broker on springboot application
Hi,
i have an application that use kafka broker, but when i run junit test,
springboot try to run kafka listeners, and i am forced to run kafka broker,
unnecessary.
I question you about how I can disable kafka when test are executed.
I have tried with @TypeExcludeFilters(KafkaListenersTypeExcludeFilter.class)
in each test class but it does not work.
Sorry for my english, it is not my native language jeje.
Thank you!
Re: Can't disable kafka broker on springboot application
Posted by ignacio gioya <ig...@gmail.com>.
Hi Quentin,
when i start springboot application this is logged (because kafka server is
not running):
[image: Selección_459.png]
(mvn clean test was runned)
Otherwise, i need run unit tests without depending of kafka server is
raised
Thank u
Regardss!!!
El El jue, 11 jun. 2020 a la(s) 07:11, Quentin Le Hénaff <le...@gmail.com>
escribió:
> Hi Ignacio,
>
> not sure if I understood your question, but have you tried the spring
> EmbedKafka feature?
>
> Regards
>
> On Thu, Jun 11, 2020 at 2:47 AM ignacio gioya <ig...@gmail.com>
> wrote:
>
> > Hi,
> > i have an application that use kafka broker, but when i run junit test,
> > springboot try to run kafka listeners, and i am forced to run kafka
> broker,
> > unnecessary.
> >
> > I question you about how I can disable kafka when test are executed.
> >
> > I have tried with
> > @TypeExcludeFilters(KafkaListenersTypeExcludeFilter.class)
> > in each test class but it does not work.
> >
> > Sorry for my english, it is not my native language jeje.
> >
> > Thank you!
> >
>
Re: Can't disable kafka broker on springboot application
Posted by Quentin Le Hénaff <le...@gmail.com>.
Hi Ignacio,
not sure if I understood your question, but have you tried the spring
EmbedKafka feature?
Regards
On Thu, Jun 11, 2020 at 2:47 AM ignacio gioya <ig...@gmail.com>
wrote:
> Hi,
> i have an application that use kafka broker, but when i run junit test,
> springboot try to run kafka listeners, and i am forced to run kafka broker,
> unnecessary.
>
> I question you about how I can disable kafka when test are executed.
>
> I have tried with
> @TypeExcludeFilters(KafkaListenersTypeExcludeFilter.class)
> in each test class but it does not work.
>
> Sorry for my english, it is not my native language jeje.
>
> Thank you!
>