Skip to content

Clarify if TEST descriptors are allowed to have children #5168

@octylFractal

Description

@octylFractal

While working on testing custom test engines with Gradle, we discovered that it's not clearly documented if a Type.TEST descriptor is allowed to have children or not, including dynamically added ones.

My opinion on this is that they are not allowed to have children, as that is the whole point of having the container Types. As such, in Gradle, we are planning to forbid this behavior to avoid needing to delay decisions on if a node is really a container or not.

Deliverables

  • Describe in TestDescriptor#getChildren Javadoc that it must be empty if the descriptor is !isContainer().
  • Describe in TestDescriptor#mayRegisterTests Javadoc that it must return false if the descriptor is !isContainer().
  • (optional) Enforce this in TestDescriptor#containsTests, and other places that may rely on this assumption.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions