diff --git a/spring-test-data-geode/src/main/java/org/springframework/data/gemfire/tests/integration/IntegrationTestsSupport.java b/spring-test-data-geode/src/main/java/org/springframework/data/gemfire/tests/integration/IntegrationTestsSupport.java index 7218f12..c7982cb 100644 --- a/spring-test-data-geode/src/main/java/org/springframework/data/gemfire/tests/integration/IntegrationTestsSupport.java +++ b/spring-test-data-geode/src/main/java/org/springframework/data/gemfire/tests/integration/IntegrationTestsSupport.java @@ -24,6 +24,7 @@ import java.util.stream.Collectors; import org.apache.geode.cache.CacheClosedException; import org.apache.geode.cache.GemFireCache; +import org.apache.geode.internal.net.SocketCreatorFactory; import org.junit.BeforeClass; import org.springframework.data.gemfire.GemfireUtils; @@ -48,12 +49,7 @@ public abstract class IntegrationTestsSupport { protected static final String TEST_GEMFIRE_LOG_LEVEL = "error"; @BeforeClass - public static void closeAnyExistingGemFireCacheInstanceBeforeTestExecution() { - closeGemFireCacheWaitOnCloseEvent(); - } - - @BeforeClass - public static void clearAllSpringPrefixedSystemProperties() { + public static void clearAllSpringDotPrefixedSystemProperties() { List springSystemProperties = System.getProperties().stringPropertyNames().stream() .filter(it -> it.toLowerCase().startsWith("spring")) @@ -62,6 +58,17 @@ public abstract class IntegrationTestsSupport { springSystemProperties.forEach(System::clearProperty); } + @BeforeClass + public static void closeAnyExistingGemFireCacheInstanceBeforeTestExecution() { + closeGemFireCacheWaitOnCloseEvent(); + } + + @BeforeClass + public static void closeAnyExistingSocketConfigurationBeforeTestExecution() { + SocketCreatorFactory.close(); + //SSLConfigurationFactory.close(); + } + public static void closeGemFireCacheWaitOnCloseEvent() { closeGemFireCacheWaitOnCloseEvent(DEFAULT_WAIT_DURATION); }