WARNING: Version 1.7 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
unit tests
editunit tests
editIn case you only need to execute a unit test, because your implementation can be isolated that well and does not require an up and running elasticsearch cluster, you can use the ElasticsearchTestCase
. If you are testing lucene features, use ElasticsearchLuceneTestCase
and if you are testing concrete token streams, use the ElasticsearchTokenStreamTestCase
class. Those specific classes execute additional checks, which ensure that no resources leaks are happening, after the test has run.