@API(status=INTERNAL,
since="5.0")
public abstract class JupiterTestDescriptor
extends AbstractTestDescriptor
implements Node<JupiterEngineExecutionContext>
| Modifier and Type | Class and Description |
|---|---|
(package private) static interface |
JupiterTestDescriptor.ExceptionHandlerInvoker<E extends Extension> |
Node.DynamicTestExecutor, Node.ExecutionMode, Node.Invocation<C extends EngineExecutionContext>, Node.SkipResultTestDescriptor.Type, TestDescriptor.Visitor| Modifier and Type | Field and Description |
|---|---|
private static ConditionEvaluator |
conditionEvaluator |
(package private) JupiterConfiguration |
configuration |
private static Logger |
logger |
children| Constructor and Description |
|---|
JupiterTestDescriptor(UniqueId uniqueId,
java.lang.reflect.AnnotatedElement element,
java.util.function.Supplier<java.lang.String> displayNameSupplier,
TestSource source,
JupiterConfiguration configuration) |
JupiterTestDescriptor(UniqueId uniqueId,
java.lang.String displayName,
TestSource source,
JupiterConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp(JupiterEngineExecutionContext context)
Clean up the supplied
context after execution. |
(package private) java.util.Optional<Node.ExecutionMode> |
getDefaultChildExecutionMode() |
(package private) java.util.Set<ExclusiveResource> |
getExclusiveResourcesFromAnnotation(java.lang.reflect.AnnotatedElement element) |
Node.ExecutionMode |
getExecutionMode()
Get the preferred of execution mode for
parallel execution of this node.
|
(package private) java.util.Optional<Node.ExecutionMode> |
getExecutionModeFromAnnotation(java.lang.reflect.AnnotatedElement element) |
(package private) java.util.Optional<Node.ExecutionMode> |
getExplicitExecutionMode() |
(package private) static java.util.Set<TestTag> |
getTags(java.lang.reflect.AnnotatedElement element) |
(package private) <E extends Extension> |
invokeExecutionExceptionHandlers(java.lang.Class<E> handlerType,
ExtensionRegistry registry,
java.lang.Throwable throwable,
JupiterTestDescriptor.ExceptionHandlerInvoker<E> handlerInvoker)
Invoke exception handlers for the supplied
Throwable one-by-one
until none are left or the throwable to handle has been swallowed. |
private <E extends Extension> |
invokeExecutionExceptionHandlers(java.util.List<E> exceptionHandlers,
java.lang.Throwable throwable,
JupiterTestDescriptor.ExceptionHandlerInvoker<E> handlerInvoker) |
abstract JupiterEngineExecutionContext |
prepare(JupiterEngineExecutionContext context)
Must be overridden and return a new context so cleanUp() does not accidentally close the parent context.
|
Node.SkipResult |
shouldBeSkipped(JupiterEngineExecutionContext context)
Determine if the execution of the supplied
context should be
skipped. |
static Node.ExecutionMode |
toExecutionMode(ExecutionMode mode) |
private static ExclusiveResource.LockMode |
toLockMode(ResourceAccessMode mode) |
private Node.SkipResult |
toSkipResult(ConditionEvaluationResult evaluationResult) |
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getTags, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitafter, around, before, execute, getExclusiveResources, nodeFinished, nodeSkippedaccept, containsTests, getDescendants, getLegacyReportingName, getType, isContainer, isRoot, isTest, mayRegisterTests, pruneprivate static final Logger logger
private static final ConditionEvaluator conditionEvaluator
final JupiterConfiguration configuration
JupiterTestDescriptor(UniqueId uniqueId, java.lang.reflect.AnnotatedElement element, java.util.function.Supplier<java.lang.String> displayNameSupplier, TestSource source, JupiterConfiguration configuration)
JupiterTestDescriptor(UniqueId uniqueId, java.lang.String displayName, TestSource source, JupiterConfiguration configuration)
static java.util.Set<TestTag> getTags(java.lang.reflect.AnnotatedElement element)
<E extends Extension> void invokeExecutionExceptionHandlers(java.lang.Class<E> handlerType, ExtensionRegistry registry, java.lang.Throwable throwable, JupiterTestDescriptor.ExceptionHandlerInvoker<E> handlerInvoker)
Throwable one-by-one
until none are left or the throwable to handle has been swallowed.private <E extends Extension> void invokeExecutionExceptionHandlers(java.util.List<E> exceptionHandlers, java.lang.Throwable throwable, JupiterTestDescriptor.ExceptionHandlerInvoker<E> handlerInvoker)
public Node.ExecutionMode getExecutionMode()
NodeThe default implementation returns Node.ExecutionMode.CONCURRENT.
getExecutionMode in interface Node<JupiterEngineExecutionContext>nullNode.ExecutionModejava.util.Optional<Node.ExecutionMode> getExplicitExecutionMode()
java.util.Optional<Node.ExecutionMode> getDefaultChildExecutionMode()
java.util.Optional<Node.ExecutionMode> getExecutionModeFromAnnotation(java.lang.reflect.AnnotatedElement element)
public static Node.ExecutionMode toExecutionMode(ExecutionMode mode)
java.util.Set<ExclusiveResource> getExclusiveResourcesFromAnnotation(java.lang.reflect.AnnotatedElement element)
private static ExclusiveResource.LockMode toLockMode(ResourceAccessMode mode)
public Node.SkipResult shouldBeSkipped(JupiterEngineExecutionContext context) throws java.lang.Exception
Nodecontext should be
skipped.
The default implementation returns Node.SkipResult.doNotSkip().
shouldBeSkipped in interface Node<JupiterEngineExecutionContext>java.lang.Exceptionprivate Node.SkipResult toSkipResult(ConditionEvaluationResult evaluationResult)
public abstract JupiterEngineExecutionContext prepare(JupiterEngineExecutionContext context) throws java.lang.Exception
prepare in interface Node<JupiterEngineExecutionContext>java.lang.ExceptionNode.cleanUp(EngineExecutionContext)public void cleanUp(JupiterEngineExecutionContext context) throws java.lang.Exception
Nodecontext after execution.
The default implementation does nothing.
cleanUp in interface Node<JupiterEngineExecutionContext>context - the context to execute injava.lang.ExceptionNode.prepare(EngineExecutionContext)