Skip to content

Commit bf5eeaa

Browse files
sbrannenmarcphilipp
authored andcommitted
Fix description of EngineDiscoveryListener in class-level Javadoc
This commit also moves the note about test engines needing to publish discovery events from EngineDiscoveryListener to TestEngine.discover(). Closes #4880 (cherry picked from commit da0e19b)
1 parent b7f3c0f commit bf5eeaa

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

junit-platform-engine/src/main/java/org/junit/platform/engine/EngineDiscoveryListener.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,16 @@
1616
import org.apiguardian.api.API;
1717

1818
/**
19-
* {@code EngineDiscoveryListener} contains {@link TestEngine} access to the
20-
* information necessary to discover tests and containers.
19+
* {@code EngineDiscoveryListener} defines the API which enables a {@link TestEngine}
20+
* to publish information about events that occur during test discovery.
2121
*
2222
* <p>All methods in this interface have empty <em>default</em> implementations.
2323
* Concrete implementations may therefore override one or more of these methods
2424
* to be notified of the selected events.
2525
*
26-
* <p>The methods declared in this interface <em>should</em> be called by
27-
* each {@link TestEngine} during test discovery. However, since this interface
28-
* was only added in 1.6, older engines might not yet do so.
29-
*
3026
* @since 1.6
3127
* @see EngineDiscoveryRequest#getDiscoveryListener()
28+
* @see org.junit.platform.launcher.LauncherDiscoveryListener
3229
*/
3330
@API(status = STABLE, since = "1.10")
3431
public interface EngineDiscoveryListener {

junit-platform-engine/src/main/java/org/junit/platform/engine/TestEngine.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ public interface TestEngine {
6767
* must be used to create unique IDs for children of the root's descriptor
6868
* by calling {@link UniqueId#append}.
6969
*
70+
* <p>Furthermore, implementations must publish events about test discovery
71+
* via the supplied {@link EngineDiscoveryRequest#getDiscoveryListener()
72+
* EngineDiscoveryListener}.
73+
*
7074
* @param discoveryRequest the discovery request; never {@code null}
7175
* @param uniqueId the unique ID to be used for this test engine's
7276
* {@code TestDescriptor}; never {@code null}

0 commit comments

Comments
 (0)