Extend o.s.d.g.tests.integration.IntegrationTestSupport to clean up the test context.

This commit is contained in:
John Blum
2018-08-29 10:46:43 -07:00
parent 5335c82781
commit 170c4da2df
3 changed files with 9 additions and 3 deletions

View File

@@ -31,6 +31,7 @@ import org.springframework.context.ApplicationContext;
import org.springframework.data.gemfire.GemfireAccessor; import org.springframework.data.gemfire.GemfireAccessor;
import org.springframework.data.gemfire.GemfireOperations; import org.springframework.data.gemfire.GemfireOperations;
import org.springframework.data.gemfire.GemfireTemplate; import org.springframework.data.gemfire.GemfireTemplate;
import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport;
import org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects; import org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects;
import org.springframework.data.gemfire.util.RegionUtils; import org.springframework.data.gemfire.util.RegionUtils;
import org.springframework.geode.boot.autoconfigure.ContinuousQueryAutoConfiguration; import org.springframework.geode.boot.autoconfigure.ContinuousQueryAutoConfiguration;
@@ -54,6 +55,7 @@ import org.springframework.test.context.junit4.SpringRunner;
* @see org.springframework.boot.test.context.SpringBootTest * @see org.springframework.boot.test.context.SpringBootTest
* @see org.springframework.context.ApplicationContext * @see org.springframework.context.ApplicationContext
* @see org.springframework.data.gemfire.GemfireTemplate * @see org.springframework.data.gemfire.GemfireTemplate
* @see org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport
* @see org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects * @see org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects
* @see org.springframework.session.Session * @see org.springframework.session.Session
* @see org.springframework.session.SessionRepository * @see org.springframework.session.SessionRepository
@@ -68,7 +70,7 @@ import org.springframework.test.context.junit4.SpringRunner;
webEnvironment = SpringBootTest.WebEnvironment.NONE webEnvironment = SpringBootTest.WebEnvironment.NONE
) )
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class AutoConfiguredSessionCachingIntegrationTests { public class AutoConfiguredSessionCachingIntegrationTests extends IntegrationTestsSupport {
@Autowired @Autowired
private ApplicationContext applicationContext; private ApplicationContext applicationContext;

View File

@@ -28,6 +28,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport;
import org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects; import org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects;
import org.springframework.geode.boot.autoconfigure.ContinuousQueryAutoConfiguration; import org.springframework.geode.boot.autoconfigure.ContinuousQueryAutoConfiguration;
import org.springframework.session.Session; import org.springframework.session.Session;
@@ -49,6 +50,7 @@ import org.springframework.test.context.junit4.SpringRunner;
* @see org.springframework.boot.test.context.SpringBootTest * @see org.springframework.boot.test.context.SpringBootTest
* @see org.springframework.context.ApplicationContext * @see org.springframework.context.ApplicationContext
* @see org.springframework.context.annotation.Bean * @see org.springframework.context.annotation.Bean
* @see org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport
* @see org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects * @see org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects
* @see org.springframework.session.Session * @see org.springframework.session.Session
* @see org.springframework.session.SessionRepository * @see org.springframework.session.SessionRepository
@@ -62,7 +64,7 @@ import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE)
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class ManuallyConfiguredSessionCachingIntegrationTests { public class ManuallyConfiguredSessionCachingIntegrationTests extends IntegrationTestsSupport {
@Autowired @Autowired
private ApplicationContext applicationContext; private ApplicationContext applicationContext;

View File

@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport;
import org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects; import org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects;
import org.springframework.geode.boot.autoconfigure.ContinuousQueryAutoConfiguration; import org.springframework.geode.boot.autoconfigure.ContinuousQueryAutoConfiguration;
import org.springframework.session.SessionRepository; import org.springframework.session.SessionRepository;
@@ -44,6 +45,7 @@ import org.springframework.test.context.junit4.SpringRunner;
* @see org.springframework.boot.autoconfigure.SpringBootApplication * @see org.springframework.boot.autoconfigure.SpringBootApplication
* @see org.springframework.boot.test.context.SpringBootTest * @see org.springframework.boot.test.context.SpringBootTest
* @see org.springframework.context.ApplicationContext * @see org.springframework.context.ApplicationContext
* @see org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport
* @see org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects * @see org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects
* @see org.springframework.session.SessionRepository * @see org.springframework.session.SessionRepository
* @see org.springframework.session.data.gemfire.config.annotation.web.http.GemFireHttpSessionConfiguration * @see org.springframework.session.data.gemfire.config.annotation.web.http.GemFireHttpSessionConfiguration
@@ -53,7 +55,7 @@ import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest(properties = "spring.session.store-type=none") @SpringBootTest(properties = "spring.session.store-type=none")
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class ManuallyConfiguredWithPropertiesSessionCachingIntegrationTests { public class ManuallyConfiguredWithPropertiesSessionCachingIntegrationTests extends IntegrationTestsSupport {
@Autowired @Autowired
private ApplicationContext applicationContext; private ApplicationContext applicationContext;