I am using Micronaut 2.4.0 and using testContainers for SQL Server Integration testing.
Here is my gradle.build
testImplementation("org.testcontainers:testcontainers")
testImplementation("org.testcontainers:junit-jupiter")
testImplementation("org.testcontainers:mssqlserver")
Here is application.yml for test
url: jdbc:tc:sqlserver://localhost;databaseName=test-db
username: sa
password: sa
driverClassName: org.testcontainers.jdbc.ContainerDatabaseDriver
These are the only changes and micronaut handles creating and starting of testcontainers.
Problem
For each test classes, it creates new container. Most of the time test takes is in container creation.
Is there a way we can re-use the container ? (clearing the DB might still be okay)