You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please feel free to close it if it's innappropriate.
Now, down to business. I consider that the current @MockBean behavior on repositories is not quite right since, as of now, if a repository is mocked with this annotation, a DB is still required for the interceptor chain to create a TX manager (for more info, please read this comment and the previous issues I linked before).
To me, this defeats the purpose of @MockBean as it forces us to still use a real thing (granted, in the end I achieved my goal using H2, but it feels more of a workaround than a proper solution). If a repository is mocked, why the framework still requires a DB when the idea is to not have one in the first place? I may be wrong on my thought, so I'm open to any feedback/suggestion.
Thanks.
P.S.: And thanks for your effort and dedication, I really like Micronaut.
The text was updated successfully, but these errors were encountered:
Issue description
Hi there!
This is an improvement request/discussion-opener on something I bumped into recently in other issues:
Please feel free to close it if it's innappropriate.
Now, down to business. I consider that the current
@MockBean
behavior on repositories is not quite right since, as of now, if a repository is mocked with this annotation, a DB is still required for the interceptor chain to create a TX manager (for more info, please read this comment and the previous issues I linked before).To me, this defeats the purpose of
@MockBean
as it forces us to still use a real thing (granted, in the end I achieved my goal using H2, but it feels more of a workaround than a proper solution). If a repository is mocked, why the framework still requires a DB when the idea is to not have one in the first place? I may be wrong on my thought, so I'm open to any feedback/suggestion.Thanks.
P.S.: And thanks for your effort and dedication, I really like Micronaut.
The text was updated successfully, but these errors were encountered: