Summer Sale! All accounts are 50% off this week.

ntamas's avatar

Running tests in parallel with Elastic

Hi,

I have a web application for which I am trying to setup parallel testing. The project has 2 databases Postgres for storing information and ElasticSearch used for search queries. These 2 are in sync, when an entity(one from the ones that are indexed by Elastic) is saved on the backend it is automatically synced to Elastic.

I have some unit tests that require Elastic sync for testing and the indices need to be refreshed before every test. The refresh is done via a trait using the 'elastic:migrate:refresh' method.

This system gets messed when trying to run tests in parallel, because indices need to be unique per testing process.

Has anyone done something similar, or have experience with this?

0 likes
0 replies

Please or to participate in this conversation.