DEV Community

Discussion on: The Testcontainers’ MongoDB Module and Spring Data MongoDB in Action

silaev profile image
silaev Author

Put it simply, my tests stop each MongoDBContainer in @AfterAll methods. I’ve added if (!MONGO_DB_CONTAINER.isShouldBeReused()) statement to stop MongoDBContainer only if we do not use Testcontainers' reusable feature. See this commit for more details. Thanks for you comment.