Class SysGlobals
java.lang.Object
com.carrotsearch.randomizedtesting.SysGlobals
Global names for system properties controlling the behavior of
JUnit4
ANT task
and RandomizedRunner
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
System property passed to forked VMs: the number of concurrent JVMs.static final String
System property passed to forked VMs: VM ID (sequential integer between 0 and the (number of concurrent jvms - 1)).private static final String
Default prefix for all properties.private static final Object
private final String
Initialized singleton's prefix.private static SysGlobals
Global singleton.private static StackTraceElement[]
Singleton initialization stack for easier debugging.private final String
private final String
private final String
private final String
private final String
private static final String
A common prefix for all system properties used byrandomizedtesting
packages.private final String
private final String
private final String
private final String
private final String
private final String
private final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Static singleton's property prefix.static SysGlobals
initializeWith
(String prefix) static String
prefixProperty
(String propertyName) Prefix a given property name with a common prefix.private String
prefixWith
(String prefix, String propertyName) private static SysGlobals
static String
Iftrue
, append seed parameter to all methods.static String
Returns the property name to express the desired status of assertions during tests.static String
The global override for the number of each test's repetitions.static String
If there's a runaway thread, how many times do we try to interrupt and then kill it before we give up? Runaway threads may affect other tests (bad idea).static String
If there's a runaway thread, how long should we wait between iterations of putting a silver bullet through its heart?static String
Global system property that holds the prefix used by other properties.static String
System property with an integer defining global initialization seeds for all random generators.static String
Enable or disable stack filtering.static String
Global override for picking out a single test class to execute.static String
Global test filter.static String
Global override for picking out a single test method to execute.static String
Global override for a single test case's maximum execution time after which it is considered out of control and an attempt to interrupt it is executed.static String
Global override for entire suite's maximum execution time after which it is considered out of control.
-
Field Details
-
CHILDVM_SYSPROP_JVM_ID
System property passed to forked VMs: VM ID (sequential integer between 0 and the (number of concurrent jvms - 1)).- See Also:
-
CHILDVM_SYSPROP_JVM_COUNT
System property passed to forked VMs: the number of concurrent JVMs.- See Also:
-
lock
-
DEFAULT_PREFIX
Default prefix for all properties.- See Also:
-
SYSPROP_PREFIX
A common prefix for all system properties used byrandomizedtesting
packages. It is discouraged to change this property but it may be used to resolve conflicts with packages that have overlapping property names.- See Also:
-
singleton
Global singleton. Initialized once. -
singletonInitStack
Singleton initialization stack for easier debugging. -
prefix
Initialized singleton's prefix. -
SYSPROP_STACKFILTERING
-
SYSPROP_RANDOM_SEED
-
SYSPROP_ITERATIONS
-
SYSPROP_TESTCLASS
-
SYSPROP_TESTMETHOD
-
SYSPROP_TESTFILTER
-
SYSPROP_KILLATTEMPTS
-
SYSPROP_KILLWAIT
-
SYSPROP_TIMEOUT
-
SYSPROP_TIMEOUT_SUITE
-
SYSPROP_APPEND_SEED
-
SYSPROP_ASSERTS
-
-
Constructor Details
-
SysGlobals
-
-
Method Details
-
prefixWith
-
singleton
-
initializeWith
-
SYSPROP_PREFIX
Global system property that holds the prefix used by other properties. -
CURRENT_PREFIX
Static singleton's property prefix. Initializes it if not already initialized. -
SYSPROP_STACKFILTERING
Enable or disable stack filtering. -
SYSPROP_RANDOM_SEED
System property with an integer defining global initialization seeds for all random generators. Should guarantee test reproducibility. -
SYSPROP_ITERATIONS
The global override for the number of each test's repetitions. -
SYSPROP_TESTCLASS
Global override for picking out a single test class to execute. All other classes are ignored. The property can contain "globbing patterns" similar to shell expansion patterns. For example:*MyTest
will pick all classes ending in MyTest (in any package, including nested static classes if they appear on input). -
SYSPROP_TESTMETHOD
Global override for picking out a single test method to execute. If a matching method exists in more than one class, it will be executed. -
SYSPROP_TESTFILTER
Global test filter. -
SYSPROP_KILLATTEMPTS
If there's a runaway thread, how many times do we try to interrupt and then kill it before we give up? Runaway threads may affect other tests (bad idea). -
SYSPROP_KILLWAIT
If there's a runaway thread, how long should we wait between iterations of putting a silver bullet through its heart? -
SYSPROP_TIMEOUT
Global override for a single test case's maximum execution time after which it is considered out of control and an attempt to interrupt it is executed.The timeout value should be in milliseconds. If the value is trailed by a "!" then the timeout value takes precedence over annotations, otherwise annotations take precedence over the default timeout. This is useful for running debugging sessions, for example, when default timeouts may be too short.
- See Also:
-
SYSPROP_TIMEOUT_SUITE
Global override for entire suite's maximum execution time after which it is considered out of control.The timeout value should be in milliseconds. If the value is trailed by a "!" then the timeout value takes precedence over annotations, otherwise annotations take precedence over the default timeout. This is useful for running debugging sessions, for example, when default timeouts may be too short.
- See Also:
-
SYSPROP_APPEND_SEED
Iftrue
, append seed parameter to all methods. Methods that are for some reason repeated (due toRepeat
annotation or multipleSeeds
, for example) are always postfixed with the seed to discriminate tests from each other. Otherwise many GUI clients have a problem in telling which test result was which. -
SYSPROP_ASSERTS
Returns the property name to express the desired status of assertions during tests.- See Also:
-
prefixProperty
Prefix a given property name with a common prefix. The prefix itself can be overridden usingSYSPROP_PREFIX
. This method initializes static singleton property names so it shouldn't be called on class initialization anywhere.
-