SGF-176 enhanced namespace schema and ClientCacheParser to process additional attributes
This commit is contained in:
@@ -93,7 +93,7 @@ public class ClientRegionNamespaceTest {
|
||||
assertEquals(DataPolicy.EMPTY, TestUtils.readField("dataPolicy", fb));
|
||||
}
|
||||
|
||||
// @Test
|
||||
@Test
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void testComplexClient() throws Exception {
|
||||
assertTrue(context.containsBean("complex"));
|
||||
@@ -102,21 +102,10 @@ public class ClientRegionNamespaceTest {
|
||||
assertFalse(ObjectUtils.isEmpty(listeners));
|
||||
assertEquals(2, listeners.length);
|
||||
assertSame(listeners[0], context.getBean("c-listener"));
|
||||
Interest[] ints = TestUtils.readField("interests", fb);
|
||||
assertEquals(2, ints.length);
|
||||
|
||||
// key interest
|
||||
Interest keyInt = ints[0];
|
||||
assertTrue((Boolean) TestUtils.readField("durable", keyInt));
|
||||
assertEquals(InterestResultPolicy.KEYS, TestUtils.readField("policy", keyInt));
|
||||
// assertEquals(Object.class, TestUtils.readField("key",
|
||||
// keyInt).getClass());
|
||||
|
||||
// regex interest
|
||||
RegexInterest regexInt = (RegexInterest) ints[1];
|
||||
assertFalse((Boolean) TestUtils.readField("durable", regexInt));
|
||||
assertEquals(InterestResultPolicy.KEYS_VALUES, TestUtils.readField("key", regexInt));
|
||||
assertEquals(".*", TestUtils.readField("key", regexInt));
|
||||
RegionAttributes attrs = TestUtils.readField("attributes", fb);
|
||||
assertEquals(500, attrs.getEntryTimeToLive().getTimeout());
|
||||
assertEquals(0.5f,attrs.getLoadFactor(),0.001);
|
||||
assertEquals(5, attrs.getEvictionAttributes().getMaximum());
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
|
||||
@@ -11,19 +11,17 @@
|
||||
|
||||
<gfe:client-cache />
|
||||
|
||||
<gfe:client-region id="simple"/>
|
||||
<gfe:client-region id="simple" />
|
||||
|
||||
<gfe:client-region id="empty" pool-name="gemfire-pool" name="publisher" data-policy="empty" close="true" destroy="false"/>
|
||||
|
||||
<gfe:client-region id="complex" pool-name="gemfire-pool" close="true" destroy="false">
|
||||
<gfe:client-region id="complex" pool-name="gemfire-pool" close="true" destroy="false" load-factor="0.5" statistics="true">
|
||||
<gfe:cache-listener>
|
||||
<ref bean="c-listener"/>
|
||||
<bean class="org.springframework.data.gemfire.SimpleCacheListener"/>
|
||||
</gfe:cache-listener>
|
||||
<gfe:key-interest durable="true" result-policy="KEYS">
|
||||
<bean id="key" class="java.lang.String"/>
|
||||
</gfe:key-interest>
|
||||
<gfe:regex-interest pattern=".*"/>
|
||||
<gfe:entry-ttl action="INVALIDATE" timeout="500"/>
|
||||
<gfe:eviction threshold="5"/>
|
||||
</gfe:client-region>
|
||||
|
||||
<bean id="c-listener" class="org.springframework.data.gemfire.SimpleCacheListener"/>
|
||||
|
||||
Reference in New Issue
Block a user