lundi 18 décembre 2017

Instantiate multiple spring boot apps in test

I have several instances of my spring boot app, which in parallel do some work with DB. Each instance is running in separate VM.
Is it a way to write a test in Java for testing that on one VM? Like following:

  1. Setup some embedded DB for testing purposes or even just mock it.
  2. Start 2-5 instances of my Spring boot app
  3. Wait some time
  4. Stop all started instances
  5. Verify DB and check that all the conditions are met.

Each instance has its own context and classpath.
I think that I could achieve that with some shell script scenario but I'd like to make it in Java.
What would be the best approach here?

Aucun commentaire:

Enregistrer un commentaire