ElasticearchIntegrationTest and Spring


(Yoav Felberbaum) #1

Hello,

I am trying to integrate the ElasticearchIntegrationTest class in my
integration tests. However, for one particular test, we would like to use
the Spring framework, more specifically the SpringJUnit4Runner (in order to
inject the spring context).

However, it seems that they do not play with each other nicely due to the
dependency by ElasticearchIntegrationTest on RandomizedRunner to set up its
own context.

Does anyone have any suggestions on how we can do integration testing using
Spring?

Thanks for any ideas!

Y.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1d2e5be2-b60b-4f77-b97e-a8a32a826929%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Alexander Reelsen) #2

Hey,

you are correct, the two runners would clash. Maybe you could use
the TestCluster class directly to start and stop instances in that
particular test? However you would lose all the nice randomized features...
but maybe thats ok in that case?

--Alex

On Tue, Mar 11, 2014 at 4:20 PM, Yoav Felberbaum realmrdini@gmail.comwrote:

Hello,

I am trying to integrate the ElasticearchIntegrationTest class in my
integration tests. However, for one particular test, we would like to use
the Spring framework, more specifically the SpringJUnit4Runner (in order to
inject the spring context).

However, it seems that they do not play with each other nicely due to the
dependency by ElasticearchIntegrationTest on RandomizedRunner to set up its
own context.

Does anyone have any suggestions on how we can do integration testing
using Spring?

Thanks for any ideas!

Y.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/1d2e5be2-b60b-4f77-b97e-a8a32a826929%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/1d2e5be2-b60b-4f77-b97e-a8a32a826929%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8cZRTr1fLrLwP6kRUV8Mad2xOigB-EnNb2UW7AUgj4Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(system) #3