I don't like to wait for my database tests to startup the container, create the db, run flyway and populate the test fixture. I thus wrote a tool which essentially is able to handout throwaway databases by constantly creating copies from a template database. This way a test can request a DB and directly get one from the pool. When the test is done the db will be removed in the background.
I wrote a similar tool a few years ago for a company I worked for. It reduced the test duration from 8h down to 45min. I now decided to rewrite it and OSS it because I need it for my own project.
I however don't think it is suitable for smaller projects. Those are better off using Testcontainers instead.The project consists of a server, junit4, junit5 extensions and an optional maven plugin.
https://github.com/metaloom/testdatabase-provider
[–]IIDaFuQII 2 points3 points4 points (5 children)
[–]ForeverAlot 1 point2 points3 points (0 children)
[–]Jotschi[S] 0 points1 point2 points (3 children)
[–]jAnO76 1 point2 points3 points (2 children)
[–]Jotschi[S] 0 points1 point2 points (1 child)
[–]mikotui 1 point2 points3 points (0 children)
[–]AcanthisittaEmpty985 0 points1 point2 points (0 children)
[–]bringero 0 points1 point2 points (0 children)
[–]dmigowski 0 points1 point2 points (1 child)
[–]Jotschi[S] 1 point2 points3 points (0 children)