Enum DefaultParallelExecutionConfigurationStrategy
- java.lang.Object
-
- java.lang.Enum<DefaultParallelExecutionConfigurationStrategy>
-
- org.junit.platform.engine.support.hierarchical.DefaultParallelExecutionConfigurationStrategy
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<DefaultParallelExecutionConfigurationStrategy>
,ParallelExecutionConfigurationStrategy
@API(status=STABLE, since="1.10") public enum DefaultParallelExecutionConfigurationStrategy extends java.lang.Enum<DefaultParallelExecutionConfigurationStrategy> implements ParallelExecutionConfigurationStrategy
Default implementations of configuration strategies for parallel test execution.- Since:
- 1.3
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CUSTOM
Allows the specification of a customParallelExecutionConfigurationStrategy
implementation via the mandatory "custom.class" configuration parameter to determine the desired configuration.DYNAMIC
Computes the desired parallelism based on the number of available processors/cores multiplied by the "dynamic.factor" configuration parameter.FIXED
Uses the mandatory "fixed.parallelism" configuration parameter as the desired parallelism.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONFIG_CUSTOM_CLASS_PROPERTY_NAME
Property name used to specify the fully qualified class name of theParallelExecutionConfigurationStrategy
to be used by theCUSTOM
configuration strategy.static java.lang.String
CONFIG_DYNAMIC_FACTOR_PROPERTY_NAME
Property name of the factor used to determine the desired parallelism for theDYNAMIC
configuration strategy.static java.lang.String
CONFIG_DYNAMIC_MAX_POOL_SIZE_FACTOR_PROPERTY_NAME
Property name of the factor used to determine the maximum pool size of the underlying fork-join pool for theDYNAMIC
configuration strategy.static java.lang.String
CONFIG_DYNAMIC_SATURATE_PROPERTY_NAME
Property name used to disable saturation of the underlying fork-join pool for theDYNAMIC
configuration strategy.static java.lang.String
CONFIG_FIXED_MAX_POOL_SIZE_PROPERTY_NAME
Property name used to configure the maximum pool size of the underlying fork-join pool for theFIXED
configuration strategy.static java.lang.String
CONFIG_FIXED_PARALLELISM_PROPERTY_NAME
Property name used to determine the desired parallelism for theFIXED
configuration strategy.static java.lang.String
CONFIG_FIXED_SATURATE_PROPERTY_NAME
Property name used to disable saturation of the underlying fork-join pool for theFIXED
configuration strategy.static java.lang.String
CONFIG_STRATEGY_PROPERTY_NAME
Property name used to determine the desired configuration strategy.private static int
KEEP_ALIVE_SECONDS
-
Constructor Summary
Constructors Modifier Constructor Description private
DefaultParallelExecutionConfigurationStrategy()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static ParallelExecutionConfigurationStrategy
getStrategy(ConfigurationParameters configurationParameters)
static DefaultParallelExecutionConfigurationStrategy
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static DefaultParallelExecutionConfigurationStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface org.junit.platform.engine.support.hierarchical.ParallelExecutionConfigurationStrategy
createConfiguration
-
-
-
-
Enum Constant Detail
-
FIXED
public static final DefaultParallelExecutionConfigurationStrategy FIXED
Uses the mandatory "fixed.parallelism" configuration parameter as the desired parallelism.
-
DYNAMIC
public static final DefaultParallelExecutionConfigurationStrategy DYNAMIC
Computes the desired parallelism based on the number of available processors/cores multiplied by the "dynamic.factor" configuration parameter.
-
CUSTOM
public static final DefaultParallelExecutionConfigurationStrategy CUSTOM
Allows the specification of a customParallelExecutionConfigurationStrategy
implementation via the mandatory "custom.class" configuration parameter to determine the desired configuration.
-
-
Field Detail
-
KEEP_ALIVE_SECONDS
private static final int KEEP_ALIVE_SECONDS
- See Also:
- Constant Field Values
-
CONFIG_STRATEGY_PROPERTY_NAME
public static final java.lang.String CONFIG_STRATEGY_PROPERTY_NAME
Property name used to determine the desired configuration strategy.Value must be one of
dynamic
,fixed
, orcustom
.- See Also:
- Constant Field Values
-
CONFIG_FIXED_PARALLELISM_PROPERTY_NAME
public static final java.lang.String CONFIG_FIXED_PARALLELISM_PROPERTY_NAME
Property name used to determine the desired parallelism for theFIXED
configuration strategy.No default value; must be an integer.
- See Also:
FIXED
, Constant Field Values
-
CONFIG_FIXED_MAX_POOL_SIZE_PROPERTY_NAME
@API(status=EXPERIMENTAL, since="1.10") public static final java.lang.String CONFIG_FIXED_MAX_POOL_SIZE_PROPERTY_NAME
Property name used to configure the maximum pool size of the underlying fork-join pool for theFIXED
configuration strategy.Value must be an integer and greater than or equal to "fixed.parallelism"; defaults to
256 + fixed.parallelism
.- Since:
- 1.10
- See Also:
FIXED
, Constant Field Values
-
CONFIG_FIXED_SATURATE_PROPERTY_NAME
@API(status=EXPERIMENTAL, since="1.10") public static final java.lang.String CONFIG_FIXED_SATURATE_PROPERTY_NAME
Property name used to disable saturation of the underlying fork-join pool for theFIXED
configuration strategy.When set to
false
the underlying fork-join pool will reject additional tasks if all available workers are busy and the maximum pool-size would be exceeded.Value must either
true
orfalse
; defaults totrue
.- Since:
- 1.10
- See Also:
FIXED
,CONFIG_FIXED_MAX_POOL_SIZE_PROPERTY_NAME
, Constant Field Values
-
CONFIG_DYNAMIC_FACTOR_PROPERTY_NAME
public static final java.lang.String CONFIG_DYNAMIC_FACTOR_PROPERTY_NAME
Property name of the factor used to determine the desired parallelism for theDYNAMIC
configuration strategy.Value must be a non-negative decimal number; defaults to
1
.- See Also:
DYNAMIC
, Constant Field Values
-
CONFIG_DYNAMIC_MAX_POOL_SIZE_FACTOR_PROPERTY_NAME
@API(status=EXPERIMENTAL, since="1.10") public static final java.lang.String CONFIG_DYNAMIC_MAX_POOL_SIZE_FACTOR_PROPERTY_NAME
Property name of the factor used to determine the maximum pool size of the underlying fork-join pool for theDYNAMIC
configuration strategy.Value must be a decimal number equal and greater than or equal to
1
. When set the maximum pool size is calculated asdynamic.max-pool-size-factor * dynamic.factor * Runtime.getRuntime().availableProcessors()
When not set the maximum pool size is calculated as256 + dynamic.factor * Runtime.getRuntime().availableProcessors()
instead.- Since:
- 1.10
- See Also:
DYNAMIC
, Constant Field Values
-
CONFIG_DYNAMIC_SATURATE_PROPERTY_NAME
@API(status=EXPERIMENTAL, since="1.10") public static final java.lang.String CONFIG_DYNAMIC_SATURATE_PROPERTY_NAME
Property name used to disable saturation of the underlying fork-join pool for theDYNAMIC
configuration strategy.When set to
false
the underlying fork-join pool will reject additional tasks if all available workers are busy and the maximum pool-size would be exceeded.Value must either
true
orfalse
; defaults totrue
.- Since:
- 1.10
- See Also:
DYNAMIC
,CONFIG_DYNAMIC_FACTOR_PROPERTY_NAME
, Constant Field Values
-
CONFIG_CUSTOM_CLASS_PROPERTY_NAME
public static final java.lang.String CONFIG_CUSTOM_CLASS_PROPERTY_NAME
Property name used to specify the fully qualified class name of theParallelExecutionConfigurationStrategy
to be used by theCUSTOM
configuration strategy.- See Also:
CUSTOM
, Constant Field Values
-
-
Method Detail
-
values
public static DefaultParallelExecutionConfigurationStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DefaultParallelExecutionConfigurationStrategy c : DefaultParallelExecutionConfigurationStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DefaultParallelExecutionConfigurationStrategy valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getStrategy
static ParallelExecutionConfigurationStrategy getStrategy(ConfigurationParameters configurationParameters)
-
-