0

In a Spring Boot web environment, our integration tests use an integrated Mongo engine (currently flapdoodle oss embedded mongo). I want to construct a way to make sure that the queries in our repository stack are utilizing the indexes that we have setup.

Right now the only idea I have is to setup a Test Runner that initializes a large volume of data BeforeClass, runs the queries, and checks the execution time to make sure they are performant. It seems like an inelegant way to do it and I was hoping there was a better way.

IcedDante
  • 4,991
  • 10
  • 49
  • 81

1 Answers1

0

Flapdoodle's embedded mongo is an instance of the Mongo Engine and is fully functioning. With that understanding, an integration performance test can be setup to load a large volume of data and run queries against it to verify that it runs in a timely manner to ensure that the indexes are utilized.

IcedDante
  • 4,991
  • 10
  • 49
  • 81