Package org.apache.lucene.tests.util
Class TestRuleRestoreSystemProperties
- java.lang.Object
-
- com.carrotsearch.randomizedtesting.rules.TestRuleAdapter
-
- org.apache.lucene.tests.util.TestRuleRestoreSystemProperties
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class TestRuleRestoreSystemProperties extends com.carrotsearch.randomizedtesting.rules.TestRuleAdapter
Restore a given set of system properties to a snapshot taken at the beginning of the rule.This is semantically similar to
SystemPropertiesRestoreRule
but the list of properties to restore must be provided explicitly (because the security manager prevents us from accessing the whole set of properties).All properties to be restored must have r/w property permission.
-
-
Constructor Summary
Constructors Constructor Description TestRuleRestoreSystemProperties(String... propertyNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
afterAlways(List<Throwable> errors)
protected void
before()
-