Class DynamicTestTestDescriptor

    • Field Detail

      • dynamicTest

        private org.junit.jupiter.api.DynamicTest dynamicTest
    • Constructor Detail

      • DynamicTestTestDescriptor

        DynamicTestTestDescriptor​(UniqueId uniqueId,
                                  int index,
                                  org.junit.jupiter.api.DynamicTest dynamicTest,
                                  TestSource source,
                                  JupiterConfiguration configuration)
    • Method Detail

      • execute

        public JupiterEngineExecutionContext execute​(JupiterEngineExecutionContext context,
                                                     Node.DynamicTestExecutor dynamicTestExecutor)
        Description copied from interface: Node
        Execute the behavior of this node.

        Containers typically do not implement this method since the HierarchicalTestEngine handles execution of their children.

        The supplied dynamicTestExecutor may be used to submit additional dynamic tests for immediate execution.

        The default implementation returns the supplied context unmodified.

        Parameters:
        context - the context to execute in
        dynamicTestExecutor - the executor to submit dynamic tests to
        Returns:
        the new context to be used for children of this node and for the after behavior of the parent of this node, if any
        See Also:
        Node.before(C), Node.after(C)
      • after

        public void after​(JupiterEngineExecutionContext context)
                   throws java.lang.Exception
        Avoid an OutOfMemoryError by releasing the reference to this descriptor's DynamicTest which holds a reference to the user-supplied Executable which may potentially consume large amounts of memory on the heap.
        Parameters:
        context - the context to execute in
        Throws:
        java.lang.Exception
        Since:
        5.5
        See Also:
        Issue 1865