Closed Amitbhave closed 3 years ago
Thanks for reporting an issue, please review the task list below before submitting the issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed.
NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (https://stackoverflow.com/tags/micronaut) or Gitter (https://gitter.im/micronautfw/). DO NOT use the issue tracker to ask questions.
For each integration test, I have to write the code to cleanup database tables in @BeforeEach/ sometimes in @BeforeAll block.
Provide annotation like @Rollback (something like spring provides - @Rollback ), which takes care of transaction rollbacks after each test
@Rollback annotation currently not present in micronaut.
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/test/annotation/Rollback.html
This is already supported:
https://micronaut-projects.github.io/micronaut-test/latest/guide/index.html#_transaction_semantics
Thanks for reporting an issue, please review the task list below before submitting the issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed.
NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (https://stackoverflow.com/tags/micronaut) or Gitter (https://gitter.im/micronautfw/). DO NOT use the issue tracker to ask questions.
Task List
Steps to Reproduce
For each integration test, I have to write the code to cleanup database tables in @BeforeEach/ sometimes in @BeforeAll block.
Expected Behaviour
Provide annotation like @Rollback (something like spring provides - @Rollback ), which takes care of transaction rollbacks after each test
Actual Behaviour
@Rollback annotation currently not present in micronaut.
Environment Information
Example Application
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/test/annotation/Rollback.html