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
When switching from using @MockBean annotation to @MockitoBean in one of our projects, I have found some inconsistency between the two, if @PostConstruct annotation is being used along with MockReset.NONE. Here is the minimal reproductive example.
I suspect, that there was some change in the time when resetting the mocks happen - for some reason @MockitoBean is being reset after @PostConstruct is resolved, even though the MockReset.NONE is being used for its configuration - this is not a case for @MockBean.
The text was updated successfully, but these errors were encountered:
When switching from using
@MockBean
annotation to@MockitoBean
in one of our projects, I have found some inconsistency between the two, if@PostConstruct
annotation is being used along withMockReset.NONE
. Here is the minimal reproductive example.I suspect, that there was some change in the time when resetting the mocks happen - for some reason
@MockitoBean
is being reset after@PostConstruct
is resolved, even though theMockReset.NONE
is being used for its configuration - this is not a case for@MockBean
.The text was updated successfully, but these errors were encountered: