From 93079f9de9e4f52df8a490079c3514fdc12f1c4c Mon Sep 17 00:00:00 2001 From: jxblum Date: Tue, 24 Sep 2013 12:08:44 -0700 Subject: [PATCH] Fixed the syntactically incorrect colocated-with-ref attribute on gfe:*-region elements, renaming back to colocated-with. Changed the ClientRegionNamespaceTest and associated context configuration file to allow Region names to be used as bean aliases in the Spring container using Spring GemFire configuration. --- .../config/ClientRegionNamespaceTest.java | 11 +++---- .../data/gemfire/colocated-region.xml | 2 +- .../data/gemfire/config/client-ns.xml | 30 +++++++++---------- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/test/java/org/springframework/data/gemfire/config/ClientRegionNamespaceTest.java b/src/test/java/org/springframework/data/gemfire/config/ClientRegionNamespaceTest.java index 39f87ccd..e9139cc3 100644 --- a/src/test/java/org/springframework/data/gemfire/config/ClientRegionNamespaceTest.java +++ b/src/test/java/org/springframework/data/gemfire/config/ClientRegionNamespaceTest.java @@ -32,8 +32,6 @@ import org.springframework.context.ApplicationContext; import org.springframework.data.gemfire.SimpleObjectSizer; import org.springframework.data.gemfire.TestUtils; import org.springframework.data.gemfire.client.ClientRegionFactoryBean; -import org.springframework.data.gemfire.client.Interest; -import org.springframework.data.gemfire.client.RegexInterest; import org.springframework.data.gemfire.test.GemfireTestApplicationContextInitializer; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @@ -44,7 +42,6 @@ import com.gemstone.gemfire.cache.DataPolicy; import com.gemstone.gemfire.cache.EvictionAction; import com.gemstone.gemfire.cache.EvictionAlgorithm; import com.gemstone.gemfire.cache.EvictionAttributes; -import com.gemstone.gemfire.cache.InterestResultPolicy; import com.gemstone.gemfire.cache.Region; import com.gemstone.gemfire.cache.RegionAttributes; import com.gemstone.gemfire.cache.util.ObjectSizer; @@ -82,7 +79,11 @@ public class ClientRegionNamespaceTest { @Test public void testBeanNames() throws Exception { - assertTrue(ObjectUtils.isEmpty(context.getAliases("publisher"))); + assertTrue(context.containsBean("SimpleRegion")); + assertTrue(context.containsBean("publisher")); + assertTrue(context.containsBean("ComplexRegion")); + assertTrue(context.containsBean("PersistentRegion")); + assertTrue(context.containsBean("OverflowRegion")); } @SuppressWarnings("rawtypes") @@ -134,4 +135,4 @@ public class ClientRegionNamespaceTest { ObjectSizer sizer = evicAttr.getObjectSizer(); assertEquals(SimpleObjectSizer.class, sizer.getClass()); } -} \ No newline at end of file +} diff --git a/src/test/resources/org/springframework/data/gemfire/colocated-region.xml b/src/test/resources/org/springframework/data/gemfire/colocated-region.xml index b81c1f15..9e565672 100644 --- a/src/test/resources/org/springframework/data/gemfire/colocated-region.xml +++ b/src/test/resources/org/springframework/data/gemfire/colocated-region.xml @@ -9,7 +9,7 @@ - + diff --git a/src/test/resources/org/springframework/data/gemfire/config/client-ns.xml b/src/test/resources/org/springframework/data/gemfire/config/client-ns.xml index 870dc8e5..cfc70c5a 100644 --- a/src/test/resources/org/springframework/data/gemfire/config/client-ns.xml +++ b/src/test/resources/org/springframework/data/gemfire/config/client-ns.xml @@ -10,12 +10,12 @@ http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> - - - + + + - - + + @@ -23,20 +23,20 @@ - + - + - - - - - - - + + + + + + + @@ -44,4 +44,4 @@ - \ No newline at end of file +