I want to run a set of test classes for my application in parallel. Inside each of the test class, the functions make calls to elasticsearch. Currently the problem I am facing in running the tests in parallel is that when I query elasticsearch from say TestA, it may include documents which were inserted during TestB. In such a case the test would fail since the desired result should contain the documents corresponding to TestA only. So, I was wondering if there was a way to isolate the requests made to elasticsearch or create a sandbox of elasticsearch for each test class.
Currently I am looking for answers which support single node cluster.
@warkolm Unfortunately, it is not possible to create new index for each test since some of the test may use some pre-existing index for their operations.
I am looking for a solution more on the lines with the following line of thought - I want to run a single instance of elasticsearch on localhost and treat it as multiple different instances such that the pre-existing indices are available across all the, let's say, "virtual" instances, but any new changes made are restricted to a particular "virtual" instance.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.