You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by sb...@apache.org on 2015/11/24 19:48:14 UTC
incubator-geode git commit: reverting "skipping region creation"
change
Repository: incubator-geode
Updated Branches:
refs/heads/feature/GEODE-578 03c9f92f6 -> cfccc654f
reverting "skipping region creation" change
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/cfccc654
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/cfccc654
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/cfccc654
Branch: refs/heads/feature/GEODE-578
Commit: cfccc654f884ff1dc2d34948dcb20b6e3867b8e5
Parents: 03c9f92
Author: Zach Gardner <za...@st5k.com>
Authored: Tue Nov 24 10:46:50 2015 -0800
Committer: Zach Gardner <za...@st5k.com>
Committed: Tue Nov 24 10:46:50 2015 -0800
----------------------------------------------------------------------
.../internal/cache/xmlcache/CacheCreation.java | 11 -----------
.../cache/xmlcache/CacheCreationJUnitTest.java | 20 +-------------------
2 files changed, 1 insertion(+), 30 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cfccc654/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
index e716f2f..4572ade 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
@@ -574,20 +574,12 @@ public class CacheCreation implements InternalCache {
Iterator it = declarativeRegions.values().iterator();
while (it.hasNext()) {
RegionCreation r = (RegionCreation)it.next();
- if (cache.getRegion(r.getName()) != null) {
- getLogger().info("Skipped initializing declarative region since one already exists (perhaps through cluster configuration)");
- continue;
- }
r.createRoot(cache);
}
}
protected void startBridgeServers(List declarativeCacheServer, Cache cache, Integer serverPort, String serverBindAdd, Boolean disableDefaultServer) {
- //Is it that the cacheserver configured in the XML is always parameterized?
- //Why cant the user define port in the XML
- // Eg:
- // <cache-server port="50505"/> - We might annoy user throwing the exception
if (declarativeCacheServer.size() > 1
&& (serverPort != null || serverBindAdd != null)) {
throw new RuntimeException(
@@ -595,9 +587,6 @@ public class CacheCreation implements InternalCache {
.toLocalizedString());
}
-
- //Creating a default cache server should not be the responsibility of cache creation
- //In case if there is no XML configuration - We dont create a cache server, so how does the client gets one?
if (declarativeCacheServer.isEmpty()
&& (serverPort != null || serverBindAdd != null)
&& (disableDefaultServer == null || !disableDefaultServer)) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cfccc654/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java
index a81befd..764d214 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java
@@ -53,25 +53,7 @@ public class CacheCreationJUnitTest {
}
@Test
- public void declarativeRegionIsNotCreatedIfOneExistsAlready() {
- CacheCreation cacheCreation = new CacheCreation();
-
- RegionCreation declarativeRegion = mock(RegionCreation.class);
- when(declarativeRegion.getName()).thenReturn("testRegion");
-
- Map declarativeRegions = new HashMap();
- declarativeRegions.put("testRegion", declarativeRegion);
-
- when(cache.getRegion("testRegion")).thenReturn(mock(Region.class));
-
- cacheCreation.initializeRegions(declarativeRegions, cache);
-
- verify(declarativeRegion, never()).createRoot(cache);
- }
-
- @Test
- //we dont know the desired behaviour
- public void defaultCacheServerIsCreatedWithDefaultPortWhenNoDeclarativeServerIsConfigured() {
+ public void defaultCacheServerIsNotCreatedWithDefaultPortWhenNoDeclarativeServerIsConfigured() {
Boolean disableDefaultCacheServer = false;
Integer configuredServerPort = null;
String configuredServerBindAddress = null;