public void testNoConnectionPools() throws CacheException { CacheCreation cache = new CacheCreation(); RegionAttributesCreation attrs = new RegionAttributesCreation(cache); attrs.setPoolName("mypool"); cache.createVMRegion("rootNORMAL", attrs); try { testXml(cache); fail("expected IllegalStateException"); } catch (IllegalStateException expected) { } } public void testAlreadyExistingPool() throws CacheException {
public void testCacheServerDisableTcpNoDelay() throws CacheException { CacheCreation cache = new CacheCreation(); CacheServer cs = cache.addCacheServer(); cs.setTcpNoDelay(false); RegionAttributesCreation attrs = new RegionAttributesCreation(cache); attrs.setDataPolicy(DataPolicy.NORMAL); cache.createVMRegion("rootNORMAL", attrs); testXml(cache); }
public void testCacheServerEnableTcpNoDelay() throws CacheException { CacheCreation cache = new CacheCreation(); CacheServer cs = cache.addCacheServer(); cs.setTcpNoDelay(true); RegionAttributesCreation attrs = new RegionAttributesCreation(cache); attrs.setDataPolicy(DataPolicy.NORMAL); cache.createVMRegion("rootNORMAL", attrs); testXml(cache); }
" because it does not contain \"regionName = <name>\""); try { fakeRootRegion = fakeCache.createVMRegion(regionName, attr); } catch (RegionExistsException e) { throw new TestException(TestHelper.getStackTrace(e));
/** * Tests the bridge-server attributes (<code>max-threads</code> * * @throws CacheException */ public void testBridgeMaxThreads() throws CacheException { CacheCreation cache = new CacheCreation(); BridgeServer bs = cache.addBridgeServer(); bs.setMaxThreads(37); bs.setMaxConnections(999); bs.setPort(AvailablePortHelper.getRandomAvailableTCPPort()); RegionAttributesCreation attrs = new RegionAttributesCreation(cache); attrs.setDataPolicy(DataPolicy.NORMAL); cache.createVMRegion("rootNORMAL", attrs); testXml(cache); }
/** * Tests the <code>message-sync-interval</code> attribute of * attribute is related to HA of client-queues in gemfire ca * framework. This attribute is the frequency at which a messent * by the primary cache-server node to all the secondary cache-server nodes to * remove the events which have already been dispatched from * the queue * * @throws CacheException */ public void testMessageSyncInterval() throws CacheException { CacheCreation cache = new CacheCreation(); cache.setMessageSyncInterval(123); RegionAttributesCreation attrs = new RegionAttributesCreation(cache); attrs.setDataPolicy(DataPolicy.NORMAL); cache.createVMRegion("rootNORMAL", attrs); testXml(cache); Cache c = getCache(); assertNotNull(c); assertEquals(123, c.getMessageSyncInterval()); }
RegionAttributesCreation attrs = new RegionAttributesCreation(cache); attrs.setDataPolicy(DataPolicy.NORMAL); cache.createVMRegion("rootNORMAL", attrs); testXml(cache); Cache c = getCache();
/** * Tests the bridge-server attributes (<code>maximum-message-count</code> * and <code>message-time-to-live</code>) related to HA of client-queues in * gemfire cache-server framework * * @throws CacheException */ public void testBridgeAttributesRelatedToClientQueuesHA() throws CacheException { CacheCreation cache = new CacheCreation(); cache.setMessageSyncInterval(3445); BridgeServer bs = cache.addBridgeServer(); bs.setMaximumMessageCount(12345); bs.setMessageTimeToLive(56789); bs.setPort(AvailablePortHelper.getRandomAvailableTCPPort()); RegionAttributesCreation attrs = new RegionAttributesCreation(cache); attrs.setDataPolicy(DataPolicy.NORMAL); cache.createVMRegion("rootNORMAL", attrs); testXml(cache); Cache c = getCache(); assertNotNull(c); BridgeServer server = (BridgeServer)cache.getBridgeServers().iterator().next(); assertNotNull(server); assertEquals(12345,server.getMaximumMessageCount()); assertEquals(56789,server.getMessageTimeToLive()); }
cache.createVMRegion("rootNORMAL", attrs); testXml(cache); Cache c = getCache();
RegionAttributesCreation attrs = new RegionAttributesCreation(cache); attrs.setDataPolicy(DataPolicy.NORMAL); cache.createVMRegion("rootNORMAL", attrs); testXml(cache); Cache c = getCache();
RegionAttributesCreation attrs = new RegionAttributesCreation(cache); attrs.setDataPolicy(DataPolicy.NORMAL); cache.createVMRegion("rootNORMAL", attrs); testXml(cache); Cache c = getCache();
RegionAttributesCreation attrs = new RegionAttributesCreation(cache); attrs.setPoolName("mypool"); cache.createVMRegion("rootNORMAL", attrs); testXml(cache); Cache c = getCache();
RegionAttributesCreation attrs = new RegionAttributesCreation(cache); attrs.setPoolName("mypool"); cache.createVMRegion("rootNORMAL", attrs); testXml(cache); Cache c = getCache();
RegionAttributesCreation attrs = new RegionAttributesCreation(cache); attrs.setPoolName("mypool"); cache.createVMRegion("rootNORMAL", attrs); testXml(cache); Cache c = getCache();
attrs.setPoolName("mypool"); cache.createVMRegion("rootNORMAL", attrs); testXml(cache); Cache c = getCache();