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

With @MicronautTest, annotation like @Rollback would be helpful #372

Closed
4 tasks done
Amitbhave opened this issue Jan 20, 2021 · 1 comment
Closed
4 tasks done

With @MicronautTest, annotation like @Rollback would be helpful #372

Amitbhave opened this issue Jan 20, 2021 · 1 comment

Comments

@Amitbhave
Copy link

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 provided
  • Stacktrace (if present) provided
  • Example that reproduces the problem uploaded to Github
  • Full description of the issue provided (see below)

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

  • Operating System: Any
  • Micronaut Version: Micronaut 2.1
  • JDK Version: 11

Example Application

https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/test/annotation/Rollback.html

@Amitbhave Amitbhave changed the title For @Micronaut test, annotation like @Rollback would be helpful With @MicronautTest, annotation like @Rollback would be helpful Jan 20, 2021
@alvarosanchez
Copy link
Member

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

No branches or pull requests

2 participants