From 0369cb85e541935487c7c13193b057747c459804 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 3 Dec 2018 18:34:40 -0800 Subject: [PATCH] Add protected instance variable, optionally auto-wired with an object reference to the configured 'ClusteredSpringSessions' Region. --- .../data/gemfire/AbstractGemFireIntegrationTests.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spring-session-data-geode/src/integration-test/java/org/springframework/session/data/gemfire/AbstractGemFireIntegrationTests.java b/spring-session-data-geode/src/integration-test/java/org/springframework/session/data/gemfire/AbstractGemFireIntegrationTests.java index 6552e7d..1365b21 100644 --- a/spring-session-data-geode/src/integration-test/java/org/springframework/session/data/gemfire/AbstractGemFireIntegrationTests.java +++ b/spring-session-data-geode/src/integration-test/java/org/springframework/session/data/gemfire/AbstractGemFireIntegrationTests.java @@ -30,6 +30,8 @@ import java.util.List; import java.util.Optional; import java.util.stream.Collectors; +import javax.annotation.Resource; + import org.junit.Before; import org.apache.geode.cache.DataPolicy; @@ -44,6 +46,7 @@ import org.springframework.context.ApplicationListener; import org.springframework.data.gemfire.tests.integration.ForkingClientServerIntegrationTestsSupport; import org.springframework.session.Session; import org.springframework.session.SessionRepository; +import org.springframework.session.data.gemfire.config.annotation.web.http.GemFireHttpSessionConfiguration; import org.springframework.session.data.gemfire.support.GemFireUtils; import org.springframework.session.events.AbstractSessionEvent; import org.springframework.util.StringUtils; @@ -92,6 +95,9 @@ public abstract class AbstractGemFireIntegrationTests extends ForkingClientServe @Autowired(required = false) protected GemFireOperationsSessionRepository gemfireSessionRepository; + @Resource(name = GemFireHttpSessionConfiguration.DEFAULT_SESSION_REGION_NAME) + protected Region sessions; + @Autowired(required = false) protected SessionRepository sessionRepository;