With Spring Boot, I use @DirtiesContext to ensure the database is cleared before each test case.
There is no @DirtiesContext annotation with Quarkus AFAIK. Instead @TestTransaction is suggested. This way the changes made by the test case are rolled back at the end of the test case. This works fine for unit tests. But, I am struggling to see how I can use this for integration tests.
My integration tests use rest assured to make rest calls to the controller. On one side, I don’t think it would be a good idea to use @TestTransaction in the controller. Even if I did, the data would be wiped when the rest call returns. And if I use @Transaction in the controller, I have no way to wipe the database for the next test case.
So, my question is how do you folks resolve this? How do you make sure you have a clean context when doing integration tests.