Module org.junit.platform.engine
Interface Node.DynamicTestExecutor
- Enclosing interface:
Node<C extends EngineExecutionContext>
public static interface Node.DynamicTestExecutor
Executor for additional, dynamic test descriptors discovered during
execution of a
Node
.
The test descriptors will be executed by the same
HierarchicalTestExecutor
that executes the submitting node.
This interface is not intended to be implemented by clients.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Block until all dynamic test descriptors submitted to this executor are finished.void
execute
(TestDescriptor testDescriptor) Submit a dynamic test descriptor for immediate execution.Future
<?> execute
(TestDescriptor testDescriptor, EngineExecutionListener executionListener) Submit a dynamic test descriptor for immediate execution with a custom, potentially no-op, execution listener.
-
Method Details
-
execute
Submit a dynamic test descriptor for immediate execution.- Parameters:
testDescriptor
- the test descriptor to be executed; nevernull
-
execute
@API(status=STABLE, since="1.10") Future<?> execute(TestDescriptor testDescriptor, EngineExecutionListener executionListener) Submit a dynamic test descriptor for immediate execution with a custom, potentially no-op, execution listener.- Parameters:
testDescriptor
- the test descriptor to be executed; nevernull
executionListener
- the executionListener to be notified; nevernull
- Returns:
- a future to cancel or wait for the execution
- Since:
- 1.7
- See Also:
-
awaitFinished
Block until all dynamic test descriptors submitted to this executor are finished.This method is useful if the node needs to perform actions in its
Node.execute(EngineExecutionContext, DynamicTestExecutor)
method after all its dynamic children have finished.- Throws:
InterruptedException
- if interrupted while waiting
-