Switch clearing all Java, Apache Geode, Pivotal GemFire and Spring System Properties to after test class.

This commit is contained in:
John Blum
2019-09-09 19:20:28 -07:00
parent 9f87352a5e
commit 859f510200

View File

@@ -103,16 +103,6 @@ public abstract class IntegrationTestsSupport {
.or(GEODE_DOT_SYSTEM_PROPERTY_NAME_PREDICATE)
.or(SPRING_DOT_SYSTEM_PROPERTY_NAME_PREDICATE);
@BeforeClass
public static void clearAllJavaGemFireGeodeAndSpringDotPrefixedSystemProperties() {
List<String> allSystemPropertyNames = System.getProperties().stringPropertyNames().stream()
.filter(ALL_SYSTEM_PROPERTIES_NAME_PREDICATE)
.collect(Collectors.toList());
allSystemPropertyNames.forEach(System::clearProperty);
}
@BeforeClass
public static void closeAnyGemFireCacheInstanceBeforeTestExecution() {
closeGemFireCacheWaitOnCloseEvent();
@@ -166,6 +156,16 @@ public abstract class IntegrationTestsSupport {
GemfireBeanFactoryLocator.clear();
}
@AfterClass
public static void clearAllJavaGemFireGeodeAndSpringDotPrefixedSystemProperties() {
List<String> allSystemPropertyNames = System.getProperties().stringPropertyNames().stream()
.filter(ALL_SYSTEM_PROPERTIES_NAME_PREDICATE)
.collect(Collectors.toList());
allSystemPropertyNames.forEach(System::clearProperty);
}
@AfterClass
public static void destroyAllGemFireMockObjects() {
GemFireMockObjectsSupport.destroy();