Allow excluding engines from memory cleanup mode#5786
Conversation
The new `junit.platform.execution.memory.cleanup.engines.excluded` configuration parameter can be used to specify a comma-separated list of engine ids that should be excluded from having their `TestDescriptors` removed in case memory cleanup mode is enabled. This can be used to work around problems with engines that required their descriptors to remain in the test tree during execution or in case their removal operation is slow/expensive. Resolves #5740.
This comment has been minimized.
This comment has been minimized.
| * {@return whether this segment is of type <em>engine</em>} | ||
| */ | ||
| @API(status = EXPERIMENTAL, since = "6.1.1") | ||
| public boolean hasEngineType() { |
There was a problem hiding this comment.
A segment consists of a type and a value. In other words, a segment has a type and a value. isEngineType and isOfTypeEngine sounded "wrong" to me. Do you have concrete suggestions that are better?
There was a problem hiding this comment.
For UniqueId we have methods named forEngine, appendEngine and getEngineId. So it seems that a segment that has the engine type is an engine segment. This would suggest .isEngine() is accurate.
Elsewhere, test descriptor without a parent is the root descriptor, which can be checked with .isRoot() so .isEngine() would be consistent with that too.
Finally, I get the impression that we intentionally hiding the fact that engine segments use ENGINE_SEGMENT_TYPE and .hasEngineType() leaks that that implementation detail while .isEngine() does not.
The new
junit.platform.execution.memory.cleanup.engines.excludedconfiguration parameter can be used to specify a comma-separated list of
engine ids that should be excluded from having their
TestDescriptorsremoved in case memory cleanup mode is enabled. This can be used to
work around problems with engines that required their descriptors to
remain in the test tree during execution or in case their removal
operation is slow/expensive.
Resolves #5740.