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
I have an extension which defines a testing module that contains a callback for injecting test utilities.
It works fine with regular application @QuarkusTests
I also have a few tests in the deployment module of the extension. There the callback seem not to be executed, even when on the class path. Also the property quarkus.test.enable-callbacks-for-integration-tests=true seems not to help.
Current solution is a manual invocation of the callback
// Manually execute the beforeEach method as it is here not called automatically
var method = this.getClass()
.getDeclaredMethod(Thread.currentThread().getStackTrace()[1].getMethodName());
var context = new QuarkusTestMethodContext(this, List.of(), method, null);
new ShareClientUtilInjectCallback().beforeEach(context);
Is there a way that the QuarkusUnitTest can pick up and execute test callbacks as expected? Or are there technical limitations?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have an extension which defines a testing module that contains a callback for injecting test utilities.
It works fine with regular application
@QuarkusTests
I also have a few tests in the deployment module of the extension. There the callback seem not to be executed, even when on the class path. Also the property
quarkus.test.enable-callbacks-for-integration-tests=true
seems not to help.Current solution is a manual invocation of the callback
Is there a way that the
QuarkusUnitTest
can pick up and execute test callbacks as expected? Or are there technical limitations?Beta Was this translation helpful? Give feedback.
All reactions