diff --git a/spring-test/src/main/java/org/springframework/test/context/TestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/TestExecutionListener.java index ef5f0ab3ca8..815f1940d39 100644 --- a/spring-test/src/main/java/org/springframework/test/context/TestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/TestExecutionListener.java @@ -44,8 +44,6 @@ package org.springframework.test.context; *

Spring provides the following out-of-the-box implementations (all of * which implement {@code Ordered}): *

* * @author Sam Brannen diff --git a/spring-test/src/main/java/org/springframework/test/context/event/EventPublishingTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/event/EventPublishingTestExecutionListener.java index ed8812783a6..1ac348f0f94 100644 --- a/spring-test/src/main/java/org/springframework/test/context/event/EventPublishingTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/event/EventPublishingTestExecutionListener.java @@ -16,15 +16,19 @@ package org.springframework.test.context.event; -import org.springframework.core.Ordered; +import java.util.function.Function; + import org.springframework.test.context.TestContext; import org.springframework.test.context.TestExecutionListener; import org.springframework.test.context.support.AbstractTestExecutionListener; /** * {@link org.springframework.test.context.TestExecutionListener TestExecutionListener} - * that publishes test execution events to a Spring test - * {@link org.springframework.context.ApplicationContext ApplicationContext}. + * that publishes test execution events to the + * {@link org.springframework.context.ApplicationContext ApplicationContext} + * for the currently executing test. Events are only published if the + * {@code ApplicationContext} {@linkplain TestContext#hasApplicationContext() + * has already been loaded}. * *

Supported Events

*