Package org.apache.lucene.tests.util
Class TestRuleIgnoreTestSuites
java.lang.Object
org.apache.lucene.tests.util.TestRuleIgnoreTestSuites
- All Implemented Interfaces:
org.junit.rules.TestRule
This rule will cause the suite to be assumption-ignored if the test class implements a given
marker interface and a special property is not set.
This is a workaround for problems with certain JUnit containers (IntelliJ) which automatically discover test suites and attempt to run nested classes that we use for testing the test framework itself.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Marker interface for nested suites that should be ignored if executed in stand-alone mode. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
A boolean system property indicating nested suites should be executed normally. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.junit.runners.model.Statement
apply
(org.junit.runners.model.Statement s, Description d) static boolean
Check if a suite class is running as a nested test.
-
Field Details
-
PROPERTY_RUN_NESTED
A boolean system property indicating nested suites should be executed normally.- See Also:
-
-
Constructor Details
-
TestRuleIgnoreTestSuites
public TestRuleIgnoreTestSuites()
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceorg.junit.rules.TestRule
-
isRunningNested
public static boolean isRunningNested()Check if a suite class is running as a nested test.
-