Add test suite tear down method (hook) to properly release GemFire Mock Object resources.

This commit is contained in:
John Blum
2018-05-31 12:30:16 -07:00
parent 982f4fe850
commit f543fb5d13

View File

@@ -26,8 +26,10 @@ 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.AfterClass;
import org.junit.BeforeClass;
import org.springframework.data.gemfire.GemfireUtils;
import org.springframework.data.gemfire.tests.mock.GemFireMockObjectsSupport;
/**
* The {@link IntegrationTestsSupport} class is an abstract base class supporting integration tests
@@ -84,6 +86,11 @@ public abstract class IntegrationTestsSupport {
//SSLConfigurationFactory.close();
}
@AfterClass
public static void destroyAllGemFireMockObjects() {
GemFireMockObjectsSupport.destroy();
}
public static void closeGemFireCacheWaitOnCloseEvent() {
closeGemFireCacheWaitOnCloseEvent(DEFAULT_WAIT_DURATION);
}