From 51e7b0e9f9dd1bc87b0663f281204491cde44a75 Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 21 Feb 2020 20:13:00 -0800 Subject: [PATCH] Remove assertion on the cache instance asserting whether the cache was an instance of o.a.g.internal.cache.GemFireCacheImpl. Remove assertion on the Region instance asserting whether the Region was an instance of o.a.g.internal.cache.AbstractRegion. Resolves gh-70. --- .../caching/AutoConfiguredCachingUnitTests.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingUnitTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingUnitTests.java index 35eec01b0..d504a6b4c 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingUnitTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingUnitTests.java @@ -25,8 +25,6 @@ import org.apache.geode.cache.Region; import org.apache.geode.cache.client.ClientCache; -import org.apache.geode.internal.cache.AbstractRegion; -import org.apache.geode.internal.cache.GemFireCacheImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringBootConfiguration; @@ -37,6 +35,7 @@ import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport; import org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects; import org.springframework.geode.boot.autoconfigure.CachingProviderAutoConfiguration; +import org.springframework.geode.util.GeodeAssertions; import org.springframework.test.context.junit4.SpringRunner; import example.test.service.TestCacheableService; @@ -75,10 +74,11 @@ public class AutoConfiguredCachingUnitTests extends IntegrationTestsSupport { public void setup() { assertThat(this.clientCache).isNotNull(); - assertThat(this.clientCache).isNotInstanceOf(GemFireCacheImpl.class); assertThat(this.randomNumbers).isNotNull(); - // TODO: Why is AbstractRegion internal!?!?! #argh - assertThat(this.randomNumbers).isNotInstanceOf(AbstractRegion.class); + + GeodeAssertions.assertThat(this.clientCache).isNotInstanceOfGemFireCacheImpl(); + GeodeAssertions.assertThat(this.randomNumbers).isNotInstanceOfAbstractRegion(); + assertThat(this.cacheableService).isNotNull(); assertThat(this.cacheableService.isCacheMiss()).isFalse(); }