Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce build times by reusing the Postgres container between tests #2398

Closed
timyates opened this issue May 20, 2024 · 0 comments · Fixed by #2399
Closed

Reduce build times by reusing the Postgres container between tests #2398

timyates opened this issue May 20, 2024 · 0 comments · Fixed by #2399
Assignees

Comments

@timyates
Copy link
Collaborator

timyates commented May 20, 2024

Currently we start a Postgres container in TestContainerSuite

  • this container is not used by the tests as the TestPropertyProvider interface requires the test lifecycle to be Lifecycle.PER_CLASS (which this is not)
  • Instead all the test properties files specify a Test Containers URL and driver so each test starts a new container.

We can improve this situation by using the Micronaut test-resources plugin.

  • This will start a single postgres container which will be used by all the tests

A quick POC reduces the test time from almost 5 minutes to just over 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant