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 a bean is accidentally annotated with both @InjectMock and @InjectSpy, some tests start failing sporadically. This makes test runs flaky and unpredictable because the framework does not clearly handle this conflicting situation.
@QuarkusTestclassAnnotationTest {
@InjectMock@InjectSpyTestBeantestBean;
// ... tests here e.g. with mockito.verify
}
Expected Behavior
Fail fast during build or test setup when a single bean is annotated with both @InjectMock and @InjectSpy.
Actual Behavior
Currently, no immediate error is raised, but tests may fail inconsistently at runtime, which makes it hard to diagnose the root cause.
Suggestion
Please add validation logic that prevents the simultaneous use of @InjectMock and @InjectSpy on the same bean. This would avoid hidden, non-deterministic test failures and make the developer experience clearer.