WARNING: Version 5.6 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
editIf your test is a well isolated unit test which doesn’t need a running elasticsearch cluster, you can use the ESTestCase
. If you are testing lucene features, use ESTestCase
and if you are testing concrete token streams, use the ESTokenStreamTestCase
class. Those specific classes execute additional checks which ensure that no resources leaks are happening, after the test has run.