I have this integration test:
@RunWith(SpringRunner.class)
@SpringBootTest(classes = MySpringApplication.class, webEnvironment = DEFINED_PORT)
public class UspControllerIT {
@Test
public void someIntegrationTest() {
...
}
}
My Spring Application is using a database, a queue and other stuff I put inside docker-compose.yml.
I want to start my Docker compose BEFORE the Spring application and to stop it AFTER the Spring application has been shutted down (I don't want to see errors in the app due to connections that could not be established or were closed).
Is there any way using test containers?
Thanks in advance.