From b2647638d58c1847145df88e1a55d51a5fa784e1 Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 25 May 2018 15:42:38 -0700 Subject: [PATCH] Remove explicit test suite setup method invoking the closeGemFireCacheWaitOnCloseEvent() method. The GemFireCache instance is now implicitly and properly cleaned up by extending the o.s.d.g.tests.integration.IntegrationTestsSupport class, which provides the test suite setup method invoking closeGemFireCacheWaitOnCloseEvent() method before tests execution begins. --- ...otApacheGeodeClientCacheApplicationIntegrationTests.java | 6 ------ ...BootApacheGeodePeerCacheApplicationIntegrationTests.java | 6 ------ .../caching/AutoConfiguredCachingIntegrationTests.java | 6 ------ .../AutoConfiguredFunctionExecutionsIntegrationTests.java | 6 ------ .../AutoConfiguredRepositoriesIntegrationTests.java | 6 ------ 5 files changed, 30 deletions(-) diff --git a/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/cache/client/SpringBootApacheGeodeClientCacheApplicationIntegrationTests.java b/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/cache/client/SpringBootApacheGeodeClientCacheApplicationIntegrationTests.java index a582b73e..a8e4c238 100644 --- a/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/cache/client/SpringBootApacheGeodeClientCacheApplicationIntegrationTests.java +++ b/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/cache/client/SpringBootApacheGeodeClientCacheApplicationIntegrationTests.java @@ -26,7 +26,6 @@ import org.apache.geode.cache.Region; import org.apache.geode.cache.client.ClientCache; import org.apache.geode.cache.client.ClientRegionShortcut; import org.apache.geode.internal.cache.GemFireCacheImpl; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -62,11 +61,6 @@ public class SpringBootApacheGeodeClientCacheApplicationIntegrationTests extends @Autowired private ClientCache clientCache; - @BeforeClass - public static void setup() { - closeGemFireCacheWaitOnCloseEvent(); - } - @Test public void clientCacheAndClientRegionAreAvailable() { diff --git a/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/cache/peer/SpringBootApacheGeodePeerCacheApplicationIntegrationTests.java b/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/cache/peer/SpringBootApacheGeodePeerCacheApplicationIntegrationTests.java index 40ff073f..14aa7852 100644 --- a/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/cache/peer/SpringBootApacheGeodePeerCacheApplicationIntegrationTests.java +++ b/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/cache/peer/SpringBootApacheGeodePeerCacheApplicationIntegrationTests.java @@ -26,7 +26,6 @@ import org.apache.geode.cache.GemFireCache; import org.apache.geode.cache.Region; import org.apache.geode.cache.client.ClientCache; import org.apache.geode.internal.cache.GemFireCacheImpl; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -64,11 +63,6 @@ public class SpringBootApacheGeodePeerCacheApplicationIntegrationTests extends I @Autowired private GemFireCache peerCache; - @BeforeClass - public static void setup() { - closeGemFireCacheWaitOnCloseEvent(); - } - @Test public void peerCacheWithPeerLocalRegionAreAvailable() { diff --git a/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/caching/AutoConfiguredCachingIntegrationTests.java b/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/caching/AutoConfiguredCachingIntegrationTests.java index 393b6a6f..48938949 100644 --- a/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/caching/AutoConfiguredCachingIntegrationTests.java +++ b/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/caching/AutoConfiguredCachingIntegrationTests.java @@ -22,7 +22,6 @@ import javax.annotation.Resource; import org.apache.geode.cache.Region; import org.apache.geode.cache.client.ClientRegionShortcut; -import org.junit.BeforeClass; import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runner.RunWith; @@ -67,11 +66,6 @@ public class AutoConfiguredCachingIntegrationTests extends IntegrationTestsSuppo @Resource(name = "CachedBooks") private Region cachedBooks; - @BeforeClass - public static void setup() { - closeGemFireCacheWaitOnCloseEvent(); - } - private void assertBook(Book book, String title) { assertThat(book).isNotNull(); diff --git a/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/function/AutoConfiguredFunctionExecutionsIntegrationTests.java b/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/function/AutoConfiguredFunctionExecutionsIntegrationTests.java index 9abfe4ed..7942e3e5 100644 --- a/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/function/AutoConfiguredFunctionExecutionsIntegrationTests.java +++ b/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/function/AutoConfiguredFunctionExecutionsIntegrationTests.java @@ -26,7 +26,6 @@ import java.util.Optional; import org.apache.geode.cache.GemFireCache; import org.apache.geode.cache.execute.FunctionService; import org.apache.shiro.util.Assert; -import org.junit.BeforeClass; import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runner.RunWith; @@ -71,11 +70,6 @@ public class AutoConfiguredFunctionExecutionsIntegrationTests extends Integratio @Autowired private Calculator calculator; - @BeforeClass - public static void setup() { - closeGemFireCacheWaitOnCloseEvent(); - } - @Test public void cacheClientIsInGroupTest() { diff --git a/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/repository/AutoConfiguredRepositoriesIntegrationTests.java b/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/repository/AutoConfiguredRepositoriesIntegrationTests.java index 620b4102..a2425443 100644 --- a/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/repository/AutoConfiguredRepositoriesIntegrationTests.java +++ b/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/repository/AutoConfiguredRepositoriesIntegrationTests.java @@ -22,7 +22,6 @@ import javax.annotation.Resource; import org.apache.geode.cache.Region; import org.apache.geode.cache.client.ClientRegionShortcut; -import org.junit.BeforeClass; import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runner.RunWith; @@ -65,11 +64,6 @@ public class AutoConfiguredRepositoriesIntegrationTests extends IntegrationTests @Resource(name = "Customers") private Region customers; - @BeforeClass - public static void setup() { - closeGemFireCacheWaitOnCloseEvent(); - } - @Test public void customerServiceWasConfiguredCorrectly() {