Top Inners Fields Constructors Methods
org.junit.platform.engine.support.hierarchical

pack-priv Class NodeTestTask<C extends EngineExecutionContext>

extends Object
implements TestTask
Class Inheritance
All Implemented Interfaces
org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutorService.TestTask
Static Imports
java.util.Objects.requireNonNull, .Objects.requireNonNullElse, java.util.concurrent.CompletableFuture.completedFuture, java.util.stream.Collectors.toCollection, org.junit.platform.engine.TestExecutionResult.failed

Since
1.3

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private static interface

Field Summary

Modifier and TypeField and Description
pack-priv static final Node.SkipResult
private @Nullable C
private final Runnable
private static final Logger
private final Node<C>
private static final Runnable
private @Nullable C
private @Nullable Node.SkipResult
private boolean
private final NodeTestTaskContext
private final TestDescriptor
private @Nullable ThrowableCollector

Constructor Summary

AccessConstructor and Description
pack-priv
NodeTestTask(NodeTestTaskContext taskContext, TestDescriptor testDescriptor)

pack-priv
NodeTestTask(NodeTestTaskContext taskContext, TestDescriptor testDescriptor, Runnable finalizer)

Method Summary

Modifier and TypeMethod and Description
private Node.SkipResult
private void
public void
private void
public Node.ExecutionMode
public ResourceLock
public TestDescriptor
private void
private void
private C
private Node.SkipResult
private ThrowableCollector
pack-priv void
setParentContext(@Nullable C parentContext)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

CANCELLED_SKIP_RESULTback to summary
pack-priv static final Node.SkipResult CANCELLED_SKIP_RESULT
contextback to summary
private @Nullable C context
finalizerback to summary
private final Runnable finalizer
loggerback to summary
private static final Logger logger
nodeback to summary
private final Node<C> node
NOOPback to summary
private static final Runnable NOOP
parentContextback to summary
private @Nullable C parentContext
skipResultback to summary
private @Nullable Node.SkipResult skipResult
startedback to summary
private boolean started
taskContextback to summary
private final NodeTestTaskContext taskContext
testDescriptorback to summary
private final TestDescriptor testDescriptor
throwableCollectorback to summary
private @Nullable ThrowableCollector throwableCollector

Constructor Detail

NodeTestTaskback to summary
pack-priv NodeTestTask(NodeTestTaskContext taskContext, TestDescriptor testDescriptor)
NodeTestTaskback to summary
pack-priv NodeTestTask(NodeTestTaskContext taskContext, TestDescriptor testDescriptor, Runnable finalizer)

Method Detail

checkWhetherSkippedback to summary
private Node.SkipResult checkWhetherSkipped() throws Exception
cleanUpback to summary
private void cleanUp()
executeback to summary
public void execute()

Implements org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutorService.TestTask.execute.

Doc from org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutorService.TestTask.execute.

Execute this task.

Annotations
@Override
executeRecursivelyback to summary
private void executeRecursively()
getExecutionModeback to summary
public Node.ExecutionMode getExecutionMode()

Implements org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutorService.TestTask.getExecutionMode.

Doc from org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutorService.TestTask.getExecutionMode.

Get the execution mode of this task.

Annotations
@Override
getResourceLockback to summary
public ResourceLock getResourceLock()

Implements org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutorService.TestTask.getResourceLock.

Doc from org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutorService.TestTask.getResourceLock.

Get the resource lock of this task.

Annotations
@Override
getTestDescriptorback to summary
public TestDescriptor getTestDescriptor()

Overrides default org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutorService.TestTask.getTestDescriptor.

Doc from org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutorService.TestTask.getTestDescriptor.

Get the test descriptor of this task.

Annotations
@Override
prepareback to summary
private void prepare()
reportCompletionback to summary
private void reportCompletion()
requiredContextback to summary
private C requiredContext()
requiredSkipResultback to summary
private Node.SkipResult requiredSkipResult()
requiredThrowableCollectorback to summary
private ThrowableCollector requiredThrowableCollector()
setParentContextback to summary
pack-priv void setParentContext(@Nullable C parentContext)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
org.junit.platform.engine.support.hierarchical back to summary

private Class NodeTestTask.DefaultDynamicTestExecutor

extends Object
implements DynamicTestExecutor
Class Inheritance
  • java.lang.Object
  • org.junit.platform.engine.support.hierarchical.NodeTestTask.DefaultDynamicTestExecutor
All Implemented Interfaces
org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor

Field Summary

Modifier and TypeField and Description
private final Map<UniqueId, NodeTestTask.DynamicTaskState>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
awaitFinished()

Implements org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor.awaitFinished.

Block until all dynamic test descriptors submitted to this executor are finished.

public void
execute(TestDescriptor testDescriptor)

Implements org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor.execute.

Submit a dynamic test descriptor for immediate execution.

public Future<?>
execute(TestDescriptor testDescriptor, EngineExecutionListener executionListener)

Implements org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor.execute.

Submit a dynamic test descriptor for immediate execution with a custom, potentially no-op, execution listener.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

unfinishedTasksback to summary
private final Map<UniqueId, NodeTestTask.DynamicTaskState> unfinishedTasks

Constructor Detail

DefaultDynamicTestExecutorback to summary
private DefaultDynamicTestExecutor()

Method Detail

awaitFinishedback to summary
public void awaitFinished() throws InterruptedException

Implements org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor.awaitFinished.

Doc from org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor.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 execute(EngineExecutionContext, DynamicTestExecutor) method after all its dynamic children have finished.

Annotations
@Override
Exceptions
InterruptedException:
if interrupted while waiting
executeback to summary
public void execute(TestDescriptor testDescriptor)

Implements org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor.execute.

Doc from org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor.execute.

Submit a dynamic test descriptor for immediate execution.

Annotations
@Override
@SuppressWarnings:FutureReturnValueIgnored
executeback to summary
public Future<?> execute(TestDescriptor testDescriptor, EngineExecutionListener executionListener)

Implements org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor.execute.

Doc from org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor.execute.

Submit a dynamic test descriptor for immediate execution with a custom, potentially no-op, execution listener.

Annotations
@Override
org.junit.platform.engine.support.hierarchical back to summary

private Interface NodeTestTask.DynamicTaskState

Annotations
@FunctionalInterface

Field Summary

Modifier and TypeField and Description
public static final NodeTestTask.DynamicTaskState

Method Summary

Modifier and TypeMethod and Description
public void
public static NodeTestTask.DynamicTaskState
public static NodeTestTask.DynamicTaskState

Field Detail

UNSCHEDULEDback to summary
public static final NodeTestTask.DynamicTaskState UNSCHEDULED

Method Detail

awaitFinishedback to summary
public void awaitFinished() throws CancellationException, ExecutionException, InterruptedException
scheduledback to summary
public static NodeTestTask.DynamicTaskState scheduled(Future<@Nullable Void> future)
unscheduledback to summary
public static NodeTestTask.DynamicTaskState unscheduled()