iwein
iwein

Reputation: 26161

How to run an embedded elastic search instance for testing

I'm working in a setup that has an embedded elastic search instance for unit testing purposes, but when I run the tests continuously with sbt (~test-only <my-test>) the system becomes increasingly unstable until it freezes and has to be killed with fire.

Things I'm having a hard time getting to work properly are:

What is the proper way to set this up, (solutions preferably using specs2, but Java based is also welcome)?

Upvotes: 10

Views: 10832

Answers (1)

javanna
javanna

Reputation: 60215

I would suggest you to have a look at the elasticsearch-test project on github. You can easily add it as a dependency to your project and use its handy annotations to start test nodes, create indices and so on.

Upvotes: 12

Related Questions