-
Notifications
You must be signed in to change notification settings - Fork 38.4k
Improve documentation for TestContext events #27757
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
Comments
As stated in the Javadoc for
This was a design decision aimed at preventing the If you have code that relies on the
Good point. In light of that, I'll repurpose this issue to improve the documentation. |
Hi Sam, could you please also consider the problematic mix of I think this is not covered by any documentation as well. |
For example, the following custom @Order(0)
public class EagerLoadingTestExecutionListener implements TestExecutionListener {
@Override
public void beforeTestClass(TestContext testContext) {
testContext.getApplicationContext();
}
} |
Hi,
The
BeforeTestClassEvent
is not published by theEventPublishingTestExecutionListener
sincehasApplicationContext()
returnsfalse
.See here for a reproducer.
The JavaDoc of BeforeTestClass only mentions that the
EventPublishingTestExecutionListener
must be registered asTestExecutionListener
which it is by default (so I also suggest reworking the documentation as normally no@TestExecutionListeners
annotation is needed).The text was updated successfully, but these errors were encountered: