From 5ef721a4bb027bcaf5c7b9c357af8a738335c99a Mon Sep 17 00:00:00 2001 From: John Blum Date: Sun, 27 May 2018 00:07:33 -0700 Subject: [PATCH] Fix Javadoc. --- ...lientCacheApplicationIntegrationTests.java | 1 + ...ePeerCacheApplicationIntegrationTests.java | 5 +- ...AutoConfiguredCachingIntegrationTests.java | 1 + ...iguredContinuousQueryIntegrationTests.java | 52 ++++++------------- ...redFunctionExecutionsIntegrationTests.java | 3 +- ...onfiguredRepositoriesIntegrationTests.java | 1 + 6 files changed, 25 insertions(+), 38 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 a8e4c238..456cf3d6 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 @@ -47,6 +47,7 @@ import org.springframework.test.context.junit4.SpringRunner; * @see org.apache.geode.cache.Region * @see org.apache.geode.cache.client.ClientCache * @see org.springframework.boot.autoconfigure.SpringBootApplication + * @see org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport * @see org.springframework.boot.test.context.SpringBootTest * @see org.springframework.test.context.junit4.SpringRunner * @since 1.0.0 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 14aa7852..50fa9e69 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 @@ -39,10 +39,11 @@ import org.springframework.data.gemfire.util.RegionUtils; import org.springframework.test.context.junit4.SpringRunner; /** - * Integration tests testing the auto-configuration of an Apache Geode peer {@link Cache} instance, overriding - * the default, {@link ClientCache} instance. + * Integration test testing the auto-configuration of an Apache Geode peer {@link Cache} instance, overriding + * the default {@link ClientCache} instance. * * @author John Blum + * @see org.junit.Test * @see org.apache.geode.cache.Cache * @see org.apache.geode.cache.Region * @see org.apache.geode.cache.client.ClientCache 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 48938949..d2b30d1c 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 @@ -44,6 +44,7 @@ import example.app.service.support.CachingBookService; * or Pivotal GemFire as the caching provider. * * @author John Blum + * @see org.junit.Test * @see org.apache.geode.cache.Region * @see org.springframework.boot.autoconfigure.SpringBootApplication * @see org.springframework.boot.test.context.SpringBootTest diff --git a/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/cq/AutoConfiguredContinuousQueryIntegrationTests.java b/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/cq/AutoConfiguredContinuousQueryIntegrationTests.java index 90e2a7ba..e36cb5c2 100644 --- a/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/cq/AutoConfiguredContinuousQueryIntegrationTests.java +++ b/geode-spring-boot-starter/src/test/java/org/springframework/boot/data/geode/cq/AutoConfiguredContinuousQueryIntegrationTests.java @@ -19,7 +19,6 @@ package org.springframework.boot.data.geode.cq; import static org.assertj.core.api.Assertions.assertThat; import java.io.IOException; -import java.util.Collections; import javax.annotation.Resource; @@ -29,13 +28,11 @@ import org.apache.geode.cache.GemFireCache; import org.apache.geode.cache.LoaderHelper; import org.apache.geode.cache.Region; import org.apache.geode.cache.client.ClientRegionShortcut; -import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.data.geode.autoconfigure.SslAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; @@ -46,50 +43,43 @@ import org.springframework.data.gemfire.GemfireTemplate; import org.springframework.data.gemfire.PartitionedRegionFactoryBean; import org.springframework.data.gemfire.client.ClientRegionFactoryBean; import org.springframework.data.gemfire.config.annotation.CacheServerApplication; -import org.springframework.data.gemfire.config.annotation.ClientCacheConfigurer; import org.springframework.data.gemfire.config.annotation.EnableLogging; import org.springframework.data.gemfire.config.annotation.EnablePdx; -import org.springframework.data.gemfire.support.ConnectionEndpoint; -import org.springframework.data.gemfire.tests.integration.ClientServerIntegrationTestsSupport; -import org.springframework.data.gemfire.tests.process.ProcessWrapper; +import org.springframework.data.gemfire.tests.integration.ForkingClientServerIntegrationTestsSupport; +import org.springframework.data.gemfire.tests.integration.config.SubscriptionEnabledClientServerIntegrationTestConfiguration; import org.springframework.test.context.junit4.SpringRunner; import example.geode.query.cq.event.TemperatureReading; import example.geode.query.cq.event.TemperatureReadingsContinuousQueriesHandler; /** - * The AutoConfiguredContinuousQueryIntegrationTests class... + * Integration tests testing the auto-configuration of Apache Geode/Pivotal GemFire Continuous Query functionality. * * @author John Blum + * @see org.junit.Test + * @see org.apache.geode.cache.GemFireCache + * @see org.apache.geode.cache.Region + * @see org.springframework.boot.autoconfigure.SpringBootApplication + * @see org.springframework.boot.test.context.SpringBootTest + * @see org.springframework.context.annotation.AnnotationConfigApplicationContext + * @see org.springframework.context.annotation.Bean + * @see org.springframework.data.gemfire.config.annotation.CacheServerApplication + * @see org.springframework.data.gemfire.tests.integration.ForkingClientServerIntegrationTestsSupport + * @see org.springframework.data.gemfire.tests.integration.config.SubscriptionEnabledClientServerIntegrationTestConfiguration + * @see org.springframework.test.context.junit4.SpringRunner * @since 1.0.0 */ @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = AutoConfiguredContinuousQueryIntegrationTests.GemFireClientConfiguration.class) @SuppressWarnings("unused") -public class AutoConfiguredContinuousQueryIntegrationTests extends ClientServerIntegrationTestsSupport { +public class AutoConfiguredContinuousQueryIntegrationTests extends ForkingClientServerIntegrationTestsSupport { private static final String GEMFIRE_LOG_LEVEL = "error"; - private static ProcessWrapper gemfireServer; - @BeforeClass public static void startGemFireServer() throws IOException { - - int availablePort = findAvailablePort(); - - gemfireServer = run(GemFireServerConfiguration.class, - String.format("-D%s=%d", GEMFIRE_CACHE_SERVER_PORT_PROPERTY, availablePort)); - - waitForServerToStart("localhost", availablePort); - - System.setProperty(GEMFIRE_CACHE_SERVER_PORT_PROPERTY, String.valueOf(availablePort)); - } - - @AfterClass - public static void stopGemFireServer() { - System.clearProperty(GEMFIRE_CACHE_SERVER_PORT_PROPERTY); - stop(gemfireServer); + startGemFireServer(GemFireServerConfiguration.class); } @Autowired @@ -121,15 +111,7 @@ public class AutoConfiguredContinuousQueryIntegrationTests extends ClientServerI @SpringBootApplication(exclude = SslAutoConfiguration.class) @EnableLogging(logLevel = GEMFIRE_LOG_LEVEL) - public static class GemFireClientConfiguration { - - @Bean - ClientCacheConfigurer clientCachePoolPortConfigurer( - @Value("${" + GEMFIRE_CACHE_SERVER_PORT_PROPERTY + ":40404}") int port) { - - return (beanName, clientCacheFactoryBean) -> clientCacheFactoryBean.setServers( - Collections.singletonList(new ConnectionEndpoint("localhost", port))); - } + public static class GemFireClientConfiguration extends SubscriptionEnabledClientServerIntegrationTestConfiguration { @Bean("TemperatureReadings") public ClientRegionFactoryBean temperatureReadingsRegion(GemFireCache gemfireCache) { 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 7942e3e5..9a8955be 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 @@ -42,10 +42,11 @@ import org.springframework.data.gemfire.tests.integration.IntegrationTestsSuppor import org.springframework.test.context.junit4.SpringRunner; /** - * Integration tests testing the auto-configuration for Spring Data Apache Geode/Pivotal GemFire + * Integration tests testing the auto-configuration of Spring Data for Apache Geode/Pivotal GemFire * Function implementations and executions support. * * @author John Blum + * @see org.junit.Test * @see org.apache.geode.cache.GemFireCache * @see org.apache.geode.cache.execute.FunctionService * @see org.springframework.boot.autoconfigure.SpringBootApplication 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 a2425443..04633984 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 @@ -42,6 +42,7 @@ import org.springframework.test.context.junit4.SpringRunner; * or Pivotal GemFire. * * @author John Blum + * @see org.junit.Test * @see org.apache.geode.cache.Region * @see org.springframework.boot.autoconfigure.SpringBootApplication * @see org.springframework.boot.test.context.SpringBootTest