Integration Test with elasticsearch


(silvina) #1

Hi All,
Is it possible to run elasticsearch in memory (mock) like hsqldb for
testing purpose?. I want to test elasticsearch but I don't want launch a
local instance.

Thanks,

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


(Nik Everett) #2

Elasticsearch's integration tests run in the same JVM as the tests so you might want to look at that. They do save data to disk but in the target directory. I'd suggest having each test try deleting an index before it creates one just to make sure to get a truely fresh copy. Remember to wait for green or yellow status after creating the index or it might not be ready for testing.

Sent from my iPhone

On Sep 13, 2013, at 12:44 PM, anivlis svlucero@gmail.com wrote:

Hi All,
Is it possible to run elasticsearch in memory (mock) like hsqldb for testing purpose?. I want to test elasticsearch but I don't want launch a local instance.

Thanks,

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


(silvina) #3

but I need to run elasticsearch.sh before run the test, is that right?

On Fri, Sep 13, 2013 at 5:18 PM, Nik Everett nik9000@gmail.com wrote:

Elasticsearch's integration tests run in the same JVM as the tests so you
might want to look at that. They do save data to disk but in the target
directory. I'd suggest having each test try deleting an index before it
creates one just to make sure to get a truely fresh copy. Remember to wait
for green or yellow status after creating the index or it might not be
ready for testing.

Sent from my iPhone

On Sep 13, 2013, at 12:44 PM, anivlis svlucero@gmail.com wrote:

Hi All,
Is it possible to run elasticsearch in memory (mock) like hsqldb for
testing purpose?. I want to test elasticsearch but I don't want launch a
local instance.

Thanks,

--
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.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/6kjyy2cq0pM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
(_/)
(='.'=)
(")
(")

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


(Nik Everett) #4

So elasticsearch itself doesn't do that. It run starts elasticsearch in the vm doing the testing. If you are java then you can do that.

Sent from my iPhone

On Sep 13, 2013, at 1:28 PM, silvina svlucero@gmail.com wrote:

but I need to run elasticsearch.sh before run the test, is that right?

On Fri, Sep 13, 2013 at 5:18 PM, Nik Everett nik9000@gmail.com wrote:

Elasticsearch's integration tests run in the same JVM as the tests so you might want to look at that. They do save data to disk but in the target directory. I'd suggest having each test try deleting an index before it creates one just to make sure to get a truely fresh copy. Remember to wait for green or yellow status after creating the index or it might not be ready for testing.

Sent from my iPhone

On Sep 13, 2013, at 12:44 PM, anivlis svlucero@gmail.com wrote:

Hi All,
Is it possible to run elasticsearch in memory (mock) like hsqldb for testing purpose?. I want to test elasticsearch but I don't want launch a local instance.

Thanks,

--
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.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/6kjyy2cq0pM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
(_/)
(='.'=)
(")
(")

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


(David Pilato) #5

Have a look at: https://github.com/dadoonet/fsriver/blob/master/src/test/java/fr/pilato/elasticsearch/river/fs/AbstractFsRiverTest.java#L67

It could help.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 13 sept. 2013 à 22:54, Nik Everett nik9000@gmail.com a écrit :

So elasticsearch itself doesn't do that. It run starts elasticsearch in the vm doing the testing. If you are java then you can do that.

Sent from my iPhone

On Sep 13, 2013, at 1:28 PM, silvina svlucero@gmail.com wrote:

but I need to run elasticsearch.sh before run the test, is that right?

On Fri, Sep 13, 2013 at 5:18 PM, Nik Everett nik9000@gmail.com wrote:

Elasticsearch's integration tests run in the same JVM as the tests so you might want to look at that. They do save data to disk but in the target directory. I'd suggest having each test try deleting an index before it creates one just to make sure to get a truely fresh copy. Remember to wait for green or yellow status after creating the index or it might not be ready for testing.

Sent from my iPhone

On Sep 13, 2013, at 12:44 PM, anivlis svlucero@gmail.com wrote:

Hi All,
Is it possible to run elasticsearch in memory (mock) like hsqldb for testing purpose?. I want to test elasticsearch but I don't want launch a local instance.

Thanks,

--
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.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/6kjyy2cq0pM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
(_/)
(='.'=)
(")
(")

--
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.
For more options, visit https://groups.google.com/groups/opt_out.
--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #6