How are you doing integration tests with your datastore?
So what is the solution? There is a very neat solution based on containers: Testcontainers. From your tests you can start a lightweight, throwaway instance of your datastore and this talk will walk you through a practical example with Elasticsearch's Testcontainer after covering the issues of other approaches first. We are also discussing the general approach of Testcontainers and how they are now widely available for various datastores.
Demoing multiple approaches of integration tests with Elasticsearch