Add test suite setup method to close any existing GemFireCache instance before test execution.

This commit is contained in:
John Blum
2018-05-23 21:01:46 -07:00
parent f232ddf894
commit 1cf1748e7e

View File

@@ -22,6 +22,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.geode.cache.CacheClosedException;
import org.apache.geode.cache.GemFireCache;
import org.junit.BeforeClass;
import org.springframework.data.gemfire.GemfireUtils;
/**
@@ -42,6 +43,11 @@ public abstract class IntegrationTestsSupport {
protected static final String GEMFIRE_LOG_LEVEL_PROPERTY = "spring.data.gemfire.log.level";
protected static final String TEST_GEMFIRE_LOG_LEVEL = "warning";
@BeforeClass
public static void closeAnyExistingGemFireCacheInstanceBeforeTestExecution() {
closeGemFireCacheWaitOnCloseEvent();
}
public static void closeGemFireCacheWaitOnCloseEvent() {
closeGemFireCacheWaitOnCloseEvent(DEFAULT_WAIT_DURATION);
}