|
|
|
|
|
by marginalia_nu
841 days ago
|
|
Testcontainers are for testing individual components, apart from the application. I built a new service registry recently, its unit tests spins up a zookeeper instance for the duration of the test, and then kills it. Also very nice with databases. Spin up a clean db, run migrations, then test db code with zero worries about accidentally leaving stuff in a table that poisons other tests. I guess the killer feature is how well it works. |
|
Are you spinning up a new instance between every test case? Because that sounds painfully slow.
I would just define a function which DELETEs all the data and call it between every test.