You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ud...@apache.org on 2020/07/02 18:11:03 UTC
[geode] 27/29: WIP - Make integrationTests happy.
This is an automated email from the ASF dual-hosted git repository.
udo pushed a commit to branch feature/GEODE-8294
in repository https://gitbox.apache.org/repos/asf/geode.git
commit 9d6aa9670f1370202ac1b3133d794888ccb7a533
Author: Patrick Johnson <pj...@pivotal.io>
AuthorDate: Wed Jul 1 18:06:59 2020 -0700
WIP - Make integrationTests happy.
---
extensions/geode-modules-session/build.gradle | 2 +
extensions/geode-modules-tomcat7/build.gradle | 2 +
extensions/geode-modules-tomcat8/build.gradle | 2 +
extensions/geode-modules/build.gradle | 1 +
geode-assembly/build.gradle | 2 +
.../commands/StartServerCommandAcceptanceTest.java | 3 +-
.../integrationTest/resources/assembly_content.txt | 25 +-
geode-core/build.gradle | 5 +-
.../apache/geode/cache30/CacheXml66DUnitTest.java | 251 +++++++++++----------
.../apache/geode/cache30/CacheXml70DUnitTest.java | 11 +-
.../apache/geode/cache30/CacheXml80DUnitTest.java | 11 +-
.../apache/geode/cache30/CacheXml81DUnitTest.java | 7 +-
.../geode/cache30/CacheXmlGeode10DUnitTest.java | 13 +-
.../ServerLauncherIntegrationTestCase.java | 7 +-
.../InternalDistributedSystemJUnitTest.java | 2 +-
.../xmlcache/CacheXmlGeneratorIntegrationTest.java | 3 +-
.../cache/xmlcache/CacheXmlParserJUnitTest.java | 7 +-
.../geode/internal/cache/GemFireCacheImpl.java | 6 +-
.../internal/cache/xmlcache/CacheCreation.java | 10 +-
.../internal/cache/xmlcache/CacheXmlGenerator.java | 6 +-
.../internal/cache/xmlcache/CacheXmlParser.java | 9 +-
.../cache/xmlcache/ClientCacheCreation.java | 4 +-
.../internal/cache/xmlcache/CacheCreationTest.java | 32 +--
.../cache/xmlcache/RegionCreationJUnitTest.java | 2 +-
.../dunit/cache/internal/JUnit4CacheTestCase.java | 12 +-
.../geode/test/dunit/rules/CacheXmlRule.java | 6 +-
geode-experimental-driver/build.gradle | 1 +
.../sanctioned-geode-gfsh-serializables.txt | 12 +-
.../LuceneIndexXmlParserIntegrationJUnitTest.java | 4 +-
.../sanctioned-geode-lucene-serializables.txt | 4 +-
.../MembershipDependenciesJUnitTest.java | 1 +
.../membership/api/MembershipAPIArchUnitTest.java | 1 +
geode-rebalancer/build.gradle | 1 +
.../geode/cache/CacheXml70GatewayDUnitTest.java | 8 +-
.../geode/cache/CacheXml80GatewayDUnitTest.java | 6 +-
...ewayReceiverXmlParsingValidationsJUnitTest.java | 17 +-
...ipleReceiversDefinedInClusterConfiguration.java | 2 +-
geode-web-management/build.gradle | 1 +
geode-web/build.gradle | 1 +
39 files changed, 274 insertions(+), 226 deletions(-)
diff --git a/extensions/geode-modules-session/build.gradle b/extensions/geode-modules-session/build.gradle
index 84bcdcf..56a3c16 100644
--- a/extensions/geode-modules-session/build.gradle
+++ b/extensions/geode-modules-session/build.gradle
@@ -43,6 +43,8 @@ dependencies {
exclude group: 'jboss'
exclude group: 'xerces'
}
+
+ integrationTestImplementation(project(':geode-common-services'))
integrationTestImplementation('commons-io:commons-io')
integrationTestImplementation('javax.servlet:javax.servlet-api')
integrationTestImplementation('junit:junit')
diff --git a/extensions/geode-modules-tomcat7/build.gradle b/extensions/geode-modules-tomcat7/build.gradle
index ff18542..5c8b894 100644
--- a/extensions/geode-modules-tomcat7/build.gradle
+++ b/extensions/geode-modules-tomcat7/build.gradle
@@ -58,6 +58,8 @@ dependencies {
integrationTestImplementation(project(':geode-dunit')) {
exclude module: 'geode-core'
}
+
+ integrationTestImplementation(project(':geode-common-services'))
integrationTestImplementation(project(':extensions:geode-modules-test'))
integrationTestRuntimeOnly('javax.annotation:jsr250-api')
diff --git a/extensions/geode-modules-tomcat8/build.gradle b/extensions/geode-modules-tomcat8/build.gradle
index 4373732..1a447db 100644
--- a/extensions/geode-modules-tomcat8/build.gradle
+++ b/extensions/geode-modules-tomcat8/build.gradle
@@ -63,6 +63,8 @@ dependencies {
testImplementation(project(':geode-common-services'))
+ integrationTestImplementation(project(':geode-common-services'))
+
integrationTestImplementation(project(':geode-dunit')) {
exclude module: 'geode-core'
}
diff --git a/extensions/geode-modules/build.gradle b/extensions/geode-modules/build.gradle
index 71f5b88..76830d0 100644
--- a/extensions/geode-modules/build.gradle
+++ b/extensions/geode-modules/build.gradle
@@ -60,6 +60,7 @@ dependencies {
testImplementation('org.mockito:mockito-core')
+ integrationTestImplementation(project(':geode-common-services'))
integrationTestImplementation('junit:junit')
integrationTestImplementation('pl.pragmatists:JUnitParams')
diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle
index dd4b6a8..6d49c24 100755
--- a/geode-assembly/build.gradle
+++ b/geode-assembly/build.gradle
@@ -201,6 +201,7 @@ dependencies {
acceptanceTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
+ integrationTestImplementation(project(':geode-common-services'))
integrationTestImplementation(project(':geode-core'))
integrationTestImplementation(project(':geode-gfsh'))
integrationTestImplementation(project(':geode-log4j')) {
@@ -232,6 +233,7 @@ dependencies {
integrationTestRuntimeOnly('joda-time:joda-time')
+ distributedTestImplementation(project(':geode-common-services'))
distributedTestCompileOnly(platform(project(':boms:geode-all-bom')))
distributedTestCompileOnly('io.swagger:swagger-annotations')
distributedTestImplementation(project(':geode-gfsh'))
diff --git a/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/StartServerCommandAcceptanceTest.java b/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/StartServerCommandAcceptanceTest.java
index b955bf7..490a835 100644
--- a/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/StartServerCommandAcceptanceTest.java
+++ b/geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/StartServerCommandAcceptanceTest.java
@@ -32,6 +32,7 @@ import org.apache.geode.cache.server.CacheServer;
import org.apache.geode.internal.AvailablePortHelper;
import org.apache.geode.internal.cache.xmlcache.CacheCreation;
import org.apache.geode.internal.cache.xmlcache.CacheXmlGenerator;
+import org.apache.geode.services.module.ModuleService;
import org.apache.geode.test.junit.rules.gfsh.GfshExecution;
import org.apache.geode.test.junit.rules.gfsh.GfshRule;
import org.apache.geode.test.junit.rules.gfsh.GfshScript;
@@ -58,7 +59,7 @@ public class StartServerCommandAcceptanceTest {
File logFile = temporaryFolder.newFile(testName.getMethodName() + ".log");
File cacheXmlFile = temporaryFolder.newFile(testName.getMethodName() + "Cache.xml");
- CacheCreation creation = new CacheCreation();
+ CacheCreation creation = new CacheCreation(ModuleService.DEFAULT);
CacheServer server = creation.addCacheServer();
server.setPort(40404);
server.setBindAddress(null);
diff --git a/geode-assembly/src/integrationTest/resources/assembly_content.txt b/geode-assembly/src/integrationTest/resources/assembly_content.txt
index 1d37fde..b6f2594 100644
--- a/geode-assembly/src/integrationTest/resources/assembly_content.txt
+++ b/geode-assembly/src/integrationTest/resources/assembly_content.txt
@@ -733,6 +733,7 @@ javadoc/org/apache/geode/management/cli/CommandServiceException.html
javadoc/org/apache/geode/management/cli/CommandStatement.html
javadoc/org/apache/geode/management/cli/ConverterHint.html
javadoc/org/apache/geode/management/cli/Disabled.html
+javadoc/org/apache/geode/management/cli/GeodeCommandMarker.html
javadoc/org/apache/geode/management/cli/GfshCommand.html
javadoc/org/apache/geode/management/cli/Result.Status.html
javadoc/org/apache/geode/management/cli/Result.html
@@ -834,14 +835,10 @@ javadoc/org/apache/geode/modules/session/bootstrap/package-frame.html
javadoc/org/apache/geode/modules/session/bootstrap/package-summary.html
javadoc/org/apache/geode/modules/session/bootstrap/package-tree.html
javadoc/org/apache/geode/modules/session/catalina/AbstractCacheLifecycleListener.html
+javadoc/org/apache/geode/modules/session/catalina/AbstractCommitSessionValve.html
javadoc/org/apache/geode/modules/session/catalina/AbstractSessionCache.html
javadoc/org/apache/geode/modules/session/catalina/ClientServerCacheLifecycleListener.html
javadoc/org/apache/geode/modules/session/catalina/ClientServerSessionCache.html
-javadoc/org/apache/geode/modules/session/catalina/AbstractCommitSessionValve.html
-javadoc/org/apache/geode/modules/session/catalina/Tomcat6CommitSessionValve.html
-javadoc/org/apache/geode/modules/session/catalina/Tomcat7CommitSessionValve.html
-javadoc/org/apache/geode/modules/session/catalina/Tomcat8CommitSessionValve.html
-javadoc/org/apache/geode/modules/session/catalina/Tomcat9CommitSessionValve.html
javadoc/org/apache/geode/modules/session/catalina/DeltaSession.html
javadoc/org/apache/geode/modules/session/catalina/DeltaSession7.html
javadoc/org/apache/geode/modules/session/catalina/DeltaSession8.html
@@ -854,9 +851,13 @@ javadoc/org/apache/geode/modules/session/catalina/PeerToPeerCacheLifecycleListen
javadoc/org/apache/geode/modules/session/catalina/PeerToPeerSessionCache.html
javadoc/org/apache/geode/modules/session/catalina/SessionCache.html
javadoc/org/apache/geode/modules/session/catalina/SessionManager.html
+javadoc/org/apache/geode/modules/session/catalina/Tomcat6CommitSessionValve.html
javadoc/org/apache/geode/modules/session/catalina/Tomcat6DeltaSessionManager.html
+javadoc/org/apache/geode/modules/session/catalina/Tomcat7CommitSessionValve.html
javadoc/org/apache/geode/modules/session/catalina/Tomcat7DeltaSessionManager.html
+javadoc/org/apache/geode/modules/session/catalina/Tomcat8CommitSessionValve.html
javadoc/org/apache/geode/modules/session/catalina/Tomcat8DeltaSessionManager.html
+javadoc/org/apache/geode/modules/session/catalina/Tomcat9CommitSessionValve.html
javadoc/org/apache/geode/modules/session/catalina/Tomcat9DeltaSessionManager.html
javadoc/org/apache/geode/modules/session/catalina/callback/LocalSessionCacheLoader.html
javadoc/org/apache/geode/modules/session/catalina/callback/LocalSessionCacheWriter.html
@@ -964,21 +965,21 @@ javadoc/org/apache/geode/security/package-frame.html
javadoc/org/apache/geode/security/package-summary.html
javadoc/org/apache/geode/security/package-tree.html
javadoc/org/apache/geode/services/bootstrapping/BootstrappingService.html
-javadoc/org/apache/geode/services/bootstrapping/package-frame.html
-javadoc/org/apache/geode/services/bootstrapping/package-summary.html
-javadoc/org/apache/geode/services/bootstrapping/package-tree.html
javadoc/org/apache/geode/services/bootstrapping/impl/BootstrappingServiceImpl.html
javadoc/org/apache/geode/services/bootstrapping/impl/package-frame.html
javadoc/org/apache/geode/services/bootstrapping/impl/package-summary.html
javadoc/org/apache/geode/services/bootstrapping/impl/package-tree.html
+javadoc/org/apache/geode/services/bootstrapping/package-frame.html
+javadoc/org/apache/geode/services/bootstrapping/package-summary.html
+javadoc/org/apache/geode/services/bootstrapping/package-tree.html
javadoc/org/apache/geode/services/management/ManagementService.html
-javadoc/org/apache/geode/services/management/package-frame.html
-javadoc/org/apache/geode/services/management/package-summary.html
-javadoc/org/apache/geode/services/management/package-tree.html
javadoc/org/apache/geode/services/management/impl/ManagementServiceImpl.html
javadoc/org/apache/geode/services/management/impl/package-frame.html
javadoc/org/apache/geode/services/management/impl/package-summary.html
javadoc/org/apache/geode/services/management/impl/package-tree.html
+javadoc/org/apache/geode/services/management/package-frame.html
+javadoc/org/apache/geode/services/management/package-summary.html
+javadoc/org/apache/geode/services/management/package-tree.html
javadoc/org/apache/geode/services/module/ModuleDescriptor.Builder.html
javadoc/org/apache/geode/services/module/ModuleDescriptor.html
javadoc/org/apache/geode/services/module/ModuleService.html
@@ -1039,9 +1040,9 @@ lib/geode-lucene-0.0.0.jar
lib/geode-management-0.0.0.jar
lib/geode-membership-0.0.0.jar
lib/geode-memcached-0.0.0.jar
-lib/geode-modules-0.0.0.jar
lib/geode-module-bootstrapping-0.0.0.jar
lib/geode-module-management-0.0.0.jar
+lib/geode-modules-0.0.0.jar
lib/geode-old-client-support-0.0.0.jar
lib/geode-protobuf-0.0.0.jar
lib/geode-protobuf-messages-0.0.0.jar
diff --git a/geode-core/build.gradle b/geode-core/build.gradle
index 51ce652..b031bc8 100755
--- a/geode-core/build.gradle
+++ b/geode-core/build.gradle
@@ -186,7 +186,7 @@ dependencies {
api('commons-io:commons-io')
compileOnly(project(":geode-modules"))
- testImplementation(project(":geode-modules"))
+ testImplementation(project(":geode-common-services"))
integrationTestImplementation(project(":geode-modules"))
acceptanceTestImplementation(project(":geode-modules"))
distributedTestImplementation(project(":geode-modules"))
@@ -350,7 +350,8 @@ dependencies {
testRuntime('com.pholser:junit-quickcheck-generators')
testRuntime(project(path: ':geode-old-versions', configuration: 'testOutput'))
- integrationTestImplementation(project(':geode-gfsh'))
+ integrationTestImplementation(project(":geode-common-services"))
+ integrationTestImplementation(project(':geode-gfsh'))
integrationTestImplementation(project(':geode-junit')) {
exclude module: 'geode-core'
}
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml66DUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml66DUnitTest.java
index 7158532c..7e6cddb 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml66DUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml66DUnitTest.java
@@ -134,6 +134,7 @@ import org.apache.geode.internal.cache.xmlcache.RegionAttributesCreation;
import org.apache.geode.internal.cache.xmlcache.RegionCreation;
import org.apache.geode.internal.cache.xmlcache.ResourceManagerCreation;
import org.apache.geode.internal.cache.xmlcache.SerializerCreation;
+import org.apache.geode.services.module.ModuleService;
import org.apache.geode.test.dunit.Assert;
import org.apache.geode.test.dunit.Host;
import org.apache.geode.test.dunit.IgnoredException;
@@ -179,7 +180,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testDefaultConnectionPool() throws Exception {
getSystem();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
PoolFactory f = cache.createPoolFactory();
f.addLocator(ALIAS2, 3777);
f.create("mypool");
@@ -221,7 +222,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testDiskStore() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
DiskStoreFactory dsf = cache.createDiskStoreFactory();
File[] dirs1 = new File[] {new File("").getAbsoluteFile()};
DiskStore ds1 =
@@ -264,7 +265,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testExplicitConnectionPool() throws Exception {
getSystem();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
PoolFactory f = cache.createPoolFactory();
f.addServer(ALIAS2, 3777).addServer(ALIAS1, 3888);
f.setFreeConnectionTimeout(12345).setServerConnectionTimeout(111)
@@ -319,7 +320,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testDiskStoreValidation() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
DiskStoreFactory dsf = cache.createDiskStoreFactory();
DiskStore ds1 = dsf.create(getUniqueName());
@@ -375,7 +376,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testDiskStoreFactory() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
DiskStoreFactory dsf = cache.createDiskStoreFactory();
dsf.setDiskDirs(new File[] {new File("non_exist_dir")});
@@ -416,7 +417,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testRedefineOfDefaultDiskStore() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
DiskStoreFactory dsf = cache.createDiskStoreFactory();
dsf.setAutoCompact(!DiskStoreFactory.DEFAULT_AUTO_COMPACT);
DiskStore ds1 = dsf.create(DiskStoreFactory.DEFAULT_DISK_STORE_NAME);
@@ -444,7 +445,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testPersistentPartition() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setDataPolicy(DataPolicy.PERSISTENT_PARTITION);
@@ -468,7 +469,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testBridgeAttributesRelatedToHAOverFlow65() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
cache.setMessageSyncInterval(3445);
CacheServer bs = cache.addCacheServer();
ClientSubscriptionConfig csc = bs.getClientSubscriptionConfig();
@@ -509,7 +510,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testClientSubscriptionQueueUsingDefaultDS() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
cache.setMessageSyncInterval(3445);
CacheServer bs = cache.addCacheServer();
ClientSubscriptionConfig csc = bs.getClientSubscriptionConfig();
@@ -543,7 +544,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testTransactionWriter() throws Exception {
- CacheCreation creation = new CacheCreation();
+ CacheCreation creation = new CacheCreation(ModuleService.DEFAULT);
CacheTransactionManagerCreation ctmc = new CacheTransactionManagerCreation();
ctmc.setWriter(new TestTransactionWriter());
creation.addCacheTransactionManagerCreation(ctmc);
@@ -628,7 +629,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testBackupFiles() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
File backup1 = new File("/back/me/up");
File backup2 = new File("/me/too/please");
cache.addBackup(backup1);
@@ -654,7 +655,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testNormalCache() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
cache.setCopyOnRead(true);
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
@@ -668,7 +669,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPARTITION() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root = (RegionCreation) cache.createRegion("partition", "PARTITION");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
@@ -682,7 +683,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPARTITION_REDUNDANT() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root = (RegionCreation) cache.createRegion("rpartition", "PARTITION_REDUNDANT");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
@@ -696,7 +697,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPARTITION_PERSISTENT() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root = (RegionCreation) cache.createRegion("ppartition", "PARTITION_PERSISTENT");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
@@ -710,7 +711,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPARTITION_REDUNDANT_PERSISTENT() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root =
(RegionCreation) cache.createRegion("prpartition", "PARTITION_REDUNDANT_PERSISTENT");
testXml(cache);
@@ -725,7 +726,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPARTITION_OVERFLOW() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
ResourceManagerCreation rmc = new ResourceManagerCreation();
rmc.setEvictionHeapPercentage(55.0f);
rmc.setCriticalHeapPercentage(80.0f);
@@ -748,7 +749,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPARTITION_REDUNDANT_OVERFLOW() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root =
(RegionCreation) cache.createRegion("rpartitionoverflow", "PARTITION_REDUNDANT_OVERFLOW");
testXml(cache);
@@ -767,7 +768,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPARTITION_PERSISTENT_OVERFLOW() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
ResourceManagerCreation rmc = new ResourceManagerCreation();
rmc.setCriticalHeapPercentage(80.0f);
cache.setResourceManagerCreation(rmc);
@@ -789,7 +790,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPARTITION_REDUNDANT_PERSISTENT_OVERFLOW() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
ResourceManagerCreation rmc = new ResourceManagerCreation();
rmc.setEvictionHeapPercentage(0.0f); // test bug 42130
cache.setResourceManagerCreation(rmc);
@@ -810,7 +811,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPARTITION_HEAP_LRU() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root = (RegionCreation) cache.createRegion("partitionlru", "PARTITION_HEAP_LRU");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
@@ -827,7 +828,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPARTITION_REDUNDANT_HEAP_LRU() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root =
(RegionCreation) cache.createRegion("rpartitionlru", "PARTITION_REDUNDANT_HEAP_LRU");
testXml(cache);
@@ -845,7 +846,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testREPLICATE() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root = (RegionCreation) cache.createRegion("replicate", "REPLICATE");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
@@ -858,7 +859,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testREPLICATE_PERSISTENT() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root = (RegionCreation) cache.createRegion("preplicate", "REPLICATE_PERSISTENT");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
@@ -871,7 +872,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testREPLICATE_OVERFLOW() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root =
(RegionCreation) cache.createRegion("replicateoverflow", "REPLICATE_OVERFLOW");
testXml(cache);
@@ -889,7 +890,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testREPLICATE_PERSISTENT_OVERFLOW() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root =
(RegionCreation) cache.createRegion("preplicateoverflow", "REPLICATE_PERSISTENT_OVERFLOW");
testXml(cache);
@@ -907,7 +908,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testREPLICATE_HEAP_LRU() throws Exception, IOException {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root = (RegionCreation) cache.createRegion("replicatelru", "REPLICATE_HEAP_LRU");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
@@ -924,7 +925,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testLOCAL() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root = (RegionCreation) cache.createRegion("local", "LOCAL");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
@@ -937,7 +938,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testLOCAL_PERSISTENT() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root = (RegionCreation) cache.createRegion("plocal", "LOCAL_PERSISTENT");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
@@ -950,7 +951,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testLOCAL_HEAP_LRU() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root = (RegionCreation) cache.createRegion("locallru", "LOCAL_HEAP_LRU");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
@@ -966,7 +967,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testLOCAL_OVERFLOW() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root = (RegionCreation) cache.createRegion("localoverflow", "LOCAL_OVERFLOW");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
@@ -983,7 +984,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testLOCAL_PERSISTENT_OVERFLOW() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root =
(RegionCreation) cache.createRegion("cpolocal", "LOCAL_PERSISTENT_OVERFLOW");
testXml(cache);
@@ -1001,7 +1002,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPARTITION_PROXY() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root = (RegionCreation) cache.createRegion("partitionProxy", "PARTITION_PROXY");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
@@ -1016,7 +1017,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPARTITION_PROXY_REDUNDANT() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root =
(RegionCreation) cache.createRegion("rpartitionProxy", "PARTITION_PROXY_REDUNDANT");
testXml(cache);
@@ -1032,7 +1033,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testREPLICATE_PROXY() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root = (RegionCreation) cache.createRegion("replicateProxy", "REPLICATE_PROXY");
testXml(cache);
GemFireCacheImpl c = (GemFireCacheImpl) getCache();
@@ -1206,7 +1207,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testFixedPartitioning() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation();
FixedPartitionAttributes fpa1 = FixedPartitionAttributes.createFixedPartition("Q1");
FixedPartitionAttributes fpa2 = FixedPartitionAttributes.createFixedPartition("Q2", true);
@@ -1241,7 +1242,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testFixedPartitioning_colocation_WithAttributes() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
FixedPartitionAttributes fpa1 = FixedPartitionAttributes.createFixedPartition("Q1");
FixedPartitionAttributes fpa2 = FixedPartitionAttributes.createFixedPartition("Q2", true);
FixedPartitionAttributes fpa3 = FixedPartitionAttributes.createFixedPartition("Q3", 3);
@@ -1347,7 +1348,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPdxDefaults() throws Exception {
- CacheCreation creation = new CacheCreation();
+ CacheCreation creation = new CacheCreation(ModuleService.DEFAULT);
testXml(creation);
Cache c = getCache();
@@ -1363,7 +1364,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPdxAttributes() throws Exception {
- CacheCreation creation = new CacheCreation();
+ CacheCreation creation = new CacheCreation(ModuleService.DEFAULT);
creation.setPdxPersistent(true);
creation.setPdxReadSerialized(true);
creation.setPdxIgnoreUnreadFields(true);
@@ -1452,7 +1453,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testTXManagerOnClientCache() throws Exception {
ClientCacheCreation cc = new ClientCacheCreation();
- // CacheCreation cc = new CacheCreation();
+ // CacheCreation cc = new CacheCreation(ModuleService.DEFAULT);
CacheTransactionManagerCreation txMgrCreation = new CacheTransactionManagerCreation();
txMgrCreation.addListener(new TestTXListener());
cc.addCacheTransactionManagerCreation(txMgrCreation);
@@ -1507,7 +1508,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
final String r1 = rNameBase + "1";
// Setting multi-cast via nested region attributes
- CacheCreation creation = new CacheCreation();
+ CacheCreation creation = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(creation);
attrs.setScope(Scope.LOCAL);
attrs.setEarlyAck(false);
@@ -1552,7 +1553,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testRecoveryDelayAttributes() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
PartitionAttributesFactory paf = new PartitionAttributesFactory();
@@ -1597,7 +1598,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testDefaultRecoveryDelayAttributes() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
PartitionAttributesFactory paf = new PartitionAttributesFactory();
@@ -1639,7 +1640,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testResourceManagerThresholds() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
final float low = 90.0f;
final float high = 95.0f;
@@ -1789,7 +1790,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testSerializationRegistration() throws Exception {
- CacheCreation cc = new CacheCreation();
+ CacheCreation cc = new CacheCreation(ModuleService.DEFAULT);
SerializerCreation sc = new SerializerCreation();
cc.setSerializerCreation(sc);
@@ -1842,7 +1843,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testPartitionedRegionAttributesForCustomPartitioning() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
CacheXMLPartitionResolver partitionResolver = new CacheXMLPartitionResolver();
@@ -1892,7 +1893,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testCacheCreationWithFunctionService() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
FunctionServiceCreation fsc = new FunctionServiceCreation();
TestFunction function1 = new TestFunction(true, TestFunction.TEST_FUNCTION2);
TestFunction function2 = new TestFunction(true, TestFunction.TEST_FUNCTION3);
@@ -1919,7 +1920,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testPartitionedRegionAttributesForExpiration() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setStatisticsEnabled(true);
RegionAttributes rootAttrs = null;
@@ -1984,7 +1985,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPartitionedRegionAttributesForEviction() throws Exception {
final int redundantCopies = 1;
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
if (getGemFireVersion().equals(CacheXml.VERSION_6_0)) {
ResourceManagerCreation rm = new ResourceManagerCreation();
rm.setCriticalHeapPercentage(95);
@@ -2072,7 +2073,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPartitionedRegionAttributesForCoLocation() throws Exception {
closeCache();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation custAttrs = new RegionAttributesCreation(cache);
RegionAttributesCreation orderAttrs = new RegionAttributesCreation(cache);
PartitionAttributesFactory custPaf = new PartitionAttributesFactory();
@@ -2122,7 +2123,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPartitionedRegionAttributesForMemLruWithoutMaxMem() throws Exception {
final int redundantCopies = 1;
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setStatisticsEnabled(true);
@@ -2162,7 +2163,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
public void testPartitionedRegionAttributesForMemLruWithMaxMem() throws Exception {
final int redundantCopies = 1;
final int maxMem = 25;
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setStatisticsEnabled(true);
@@ -2202,7 +2203,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testReplicatedRegionAttributesForMemLruWithoutMaxMem() throws Exception {
final int redundantCopies = 1;
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
AttributesFactory fac = new AttributesFactory();
fac.setDataPolicy(DataPolicy.REPLICATE);
@@ -2230,7 +2231,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
public void testReplicatedRegionAttributesForMemLruWithMaxMem() throws Exception {
final int redundantCopies = 1;
final int maxMem = 25;
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
AttributesFactory fac = new AttributesFactory();
fac.setDataPolicy(DataPolicy.REPLICATE);
@@ -2258,7 +2259,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testDefaultCacheServerGroups() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
CacheServer bs = cache.addCacheServer();
bs.setPort(AvailablePortHelper.getRandomAvailableTCPPort());
bs.setGroups(CacheServer.DEFAULT_GROUPS);
@@ -2272,7 +2273,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testOneCacheServerGroups() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
CacheServer bs = cache.addCacheServer();
bs.setPort(AvailablePortHelper.getRandomAvailableTCPPort());
String[] groups = new String[] {"group1"};
@@ -2287,7 +2288,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testTwoCacheServerGroups() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
CacheServer bs = cache.addCacheServer();
bs.setPort(AvailablePortHelper.getRandomAvailableTCPPort());
String[] groups = new String[] {"group1", "group2"};
@@ -2302,7 +2303,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testDefaultCacheServerBindAddress() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
CacheServer bs = cache.addCacheServer();
bs.setPort(AvailablePortHelper.getRandomAvailableTCPPort());
testXml(cache);
@@ -2315,7 +2316,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testCacheServerBindAddress() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
CacheServer bs = cache.addCacheServer();
bs.setPort(AvailablePortHelper.getRandomAvailableTCPPort());
final String BA = ALIAS1;
@@ -2330,7 +2331,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testCacheServerHostnameForClients() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
CacheServer bs = cache.addCacheServer();
bs.setPort(AvailablePortHelper.getRandomAvailableTCPPort());
final String BA = ALIAS1;
@@ -2348,7 +2349,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testTwoConnectionPools() throws Exception {
getSystem();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
PoolFactory f = cache.createPoolFactory();
f.addLocator(ALIAS2, 3777).create("mypool");
f.reset().addLocator(ALIAS1, 3888).create("mypool2");
@@ -2385,7 +2386,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testNoConnectionPools() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setPoolName("mypool");
cache.createVMRegion("rootNORMAL", attrs);
@@ -2408,7 +2409,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
f.setStartDisabled(true).addLocator(ALIAS2, 12345).create("mypool");
try {
// now make sure declarative cache can't create the same pool
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
cache.createPoolFactory().addLocator(ALIAS2, 12345).create("mypool");
IgnoredException expectedException = addIgnoredException(
String.format("A pool named %s already exists", "mypool"));
@@ -2445,7 +2446,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
return null;
}
});
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
cache.createPoolFactory().addServer(NetworkUtils.getServerHostName(vm0.getHost()), port)
.setSubscriptionEnabled(true).create("connectionPool");
cache.setDynamicRegionFactoryConfig(
@@ -2475,7 +2476,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testBridgeAttributesRelatedToHAOverFlow() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
cache.setMessageSyncInterval(3445);
CacheServer bs = cache.addCacheServer();
ClientSubscriptionConfig csc = bs.getClientSubscriptionConfig();
@@ -2502,7 +2503,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testBridgeLoadProbe() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
CacheServer server = cache.addCacheServer();
server.setPort(AvailablePortHelper.getRandomAvailableTCPPort());
server.setLoadProbe(new MyLoadProbe());
@@ -2516,7 +2517,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testLoadPollInterval() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
CacheServer server = cache.addCacheServer();
server.setPort(AvailablePortHelper.getRandomAvailableTCPPort());
server.setLoadPollInterval(12345);
@@ -2621,7 +2622,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testCustomEntryXml() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setScope(Scope.DISTRIBUTED_NO_ACK);
@@ -2666,7 +2667,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testPreloadDataPolicy() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
{
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
@@ -2717,7 +2718,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testEnableSubscriptionConflationAttribute() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setEnableSubscriptionConflation(true);
cache.createRegion("root", attrs);
@@ -2806,7 +2807,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testMessageSyncInterval() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
cache.setMessageSyncInterval(123);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setDataPolicy(DataPolicy.NORMAL);
@@ -2823,7 +2824,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testBridgeAttributesRelatedToClientQueuesHA() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
cache.setMessageSyncInterval(3445);
CacheServer bs = cache.addCacheServer();
bs.setMaximumMessageCount(12345);
@@ -2851,7 +2852,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testPartitionedRegionInstantiation() {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
PartitionAttributesFactory paf = new PartitionAttributesFactory();
@@ -2866,7 +2867,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testBridgeMaxThreads() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
CacheServer bs = cache.addCacheServer();
bs.setMaxThreads(37);
@@ -2889,7 +2890,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
final String r3 = rNameBase + "3";
// Setting multi-cast via nested region attributes
- CacheCreation creation = new CacheCreation();
+ CacheCreation creation = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(creation);
attrs.setScope(Scope.LOCAL);
attrs.setEarlyAck(false);
@@ -2910,7 +2911,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
testXml(creation);
- creation = new CacheCreation();
+ creation = new CacheCreation(ModuleService.DEFAULT);
attrs = new RegionAttributesCreation(creation);
attrs.setScope(Scope.DISTRIBUTED_ACK);
attrs.setEarlyAck(false);
@@ -2948,7 +2949,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testRollOplogs() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
// Set properties for Asynch writes
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
@@ -2979,7 +2980,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testMaxOplogSize() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
// Set properties for Asynch writes
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
@@ -3010,7 +3011,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testDataPolicy() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
{
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
@@ -3081,7 +3082,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
final ResumptionAction[] actions = (ResumptionAction[]) ResumptionAction.VALUES
.toArray(new ResumptionAction[ResumptionAction.VALUES.size()]);
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
// for each policy, try each action and each role...
for (int policy = 0; policy < policies.length; policy++) {
@@ -3130,7 +3131,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testMultipleCacheListener() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
CacheListener l1 = new MyTestCacheListener();
@@ -3214,7 +3215,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testMultipleTXListener() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
CacheTransactionManagerCreation txMgrCreation = new CacheTransactionManagerCreation();
TransactionListener l1 = new MyTestTransactionListener();
TransactionListener l2 = new MySecondTestTransactionListener();
@@ -3275,7 +3276,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testRegisteringNamedRegionAttributes() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs;
String id1 = "id1";
@@ -3370,7 +3371,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testCreateSameRegionTwice() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
String name = "root";
@@ -3410,7 +3411,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testCreateSameSubregionTwice() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
String name = getUniqueName();
@@ -3474,7 +3475,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
int lockTimeout1 = 345;
int searchTimeout1 = 567;
- CacheCreation creation = new CacheCreation();
+ CacheCreation creation = new CacheCreation(ModuleService.DEFAULT);
creation.setCopyOnRead(copyOnRead1);
creation.setIsServer(isServer1);
creation.setLockLease(lockLease1);
@@ -3496,7 +3497,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
int lockTimeout2 = 456;
int searchTimeout2 = 678;
- creation = new CacheCreation();
+ creation = new CacheCreation(ModuleService.DEFAULT);
creation.setCopyOnRead(copyOnRead2);
creation.setIsServer(isServer2);
creation.setLockLease(lockLease2);
@@ -3517,14 +3518,14 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testAddRegionViaCacheXml() throws Exception {
- CacheCreation creation = new CacheCreation();
+ CacheCreation creation = new CacheCreation(ModuleService.DEFAULT);
testXml(creation);
Cache cache = getCache();
assertTrue(cache.rootRegions().isEmpty());
- creation = new CacheCreation();
+ creation = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(creation);
attrs.setScope(Scope.GLOBAL);
@@ -3555,7 +3556,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
// Create a subregion of a region that already exists
- creation = new CacheCreation();
+ creation = new CacheCreation(ModuleService.DEFAULT);
attrs = new RegionAttributesCreation(creation);
root = creation.createRegion("root", attrs);
@@ -3579,7 +3580,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testModifyRegionViaCacheXml() throws Exception {
- CacheCreation creation = new CacheCreation();
+ CacheCreation creation = new CacheCreation(ModuleService.DEFAULT);
int timeout1a = 123;
ExpirationAction action1a = ExpirationAction.LOCAL_DESTROY;
@@ -3608,7 +3609,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
assertEquals(timeout1b, subregion.getAttributes().getEntryIdleTimeout().getTimeout());
assertEquals(action1b, subregion.getAttributes().getEntryIdleTimeout().getAction());
- creation = new CacheCreation();
+ creation = new CacheCreation(ModuleService.DEFAULT);
int timeout2a = 234;
ExpirationAction action2a = ExpirationAction.LOCAL_INVALIDATE;
@@ -3647,7 +3648,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
String key1 = "KEY1";
String value1 = "VALUE1";
- CacheCreation creation = new CacheCreation();
+ CacheCreation creation = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(creation);
attrs.setScope(Scope.LOCAL);
@@ -3662,7 +3663,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
assertEquals(1, root.entrySet(false).size());
assertEquals(value1, root.get(key1));
- creation = new CacheCreation();
+ creation = new CacheCreation(ModuleService.DEFAULT);
attrs = new RegionAttributesCreation(creation);
attrs.setScope(Scope.LOCAL);
@@ -3690,7 +3691,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testEnableBridgeConflationAttribute() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setEnableBridgeConflation(true);
cache.createRegion("root", attrs);
@@ -3705,7 +3706,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testEnableAsyncConflationAttribute() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setEnableAsyncConflation(true);
cache.createRegion("root", attrs);
@@ -3718,7 +3719,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testDynamicRegionFactoryDefault() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
cache.setDynamicRegionFactoryConfig(new DynamicRegionFactory.Config());
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
cache.createRegion("root", attrs);
@@ -3737,7 +3738,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testDynamicRegionFactoryNonDefault() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
cache.setDynamicRegionFactoryConfig(
new DynamicRegionFactory.Config((File) null, null, false, false));
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
@@ -3760,7 +3761,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testDynamicRegionFactoryDiskDir() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
File f = new File("diskDir");
f.mkdirs();
cache.setDynamicRegionFactoryConfig(new DynamicRegionFactory.Config(f, null, true, true));
@@ -3784,7 +3785,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testServer() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
cache.setIsServer(true);
assertTrue(cache.isServer());
@@ -3798,7 +3799,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testBridgeServers() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
CacheServer bridge1 = cache.addCacheServer();
setBridgeAttributes(bridge1);
@@ -3814,7 +3815,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testIsLockGrantorAttribute() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setLockGrantor(true);
@@ -3834,7 +3835,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testTransactionListener() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
CacheTransactionManagerCreation txMgrCreation = new CacheTransactionManagerCreation();
txMgrCreation.setListener(new MyTestTransactionListener());
cache.addCacheTransactionManagerCreation(txMgrCreation);
@@ -3848,7 +3849,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testCacheTransactionManager() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
CacheTransactionManagerCreation txMgrCreation = new CacheTransactionManagerCreation();
cache.addCacheTransactionManagerCreation(txMgrCreation);
testXml(cache);
@@ -3861,7 +3862,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testConstrainedValues() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setValueConstraint(String.class);
@@ -3925,7 +3926,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testDefaultCache() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
testXml(cache);
}
@@ -3935,7 +3936,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testNonDefaultCache() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
cache.setLockTimeout(42);
cache.setLockLease(43);
cache.setSearchTimeout(44);
@@ -3952,7 +3953,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testEntriesInRootRegion() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionCreation root =
(RegionCreation) cache.createRegion("root", new RegionAttributesCreation(cache));
root.put("KEY1", "VALUE1");
@@ -3967,7 +3968,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testConstrainedKeys() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setKeyConstraint(String.class);
cache.createRegion("root", attrs);
@@ -3980,7 +3981,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testExpirationAttriubutes() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setStatisticsEnabled(true);
@@ -4014,7 +4015,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testCacheLoaderWithDeclarables() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
CacheLoaderWithDeclarables loader = new CacheLoaderWithDeclarables();
@@ -4030,7 +4031,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testCacheWriter() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
CacheWriter writer = new MyTestCacheWriter();
@@ -4046,7 +4047,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testCacheListener() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
CacheListener listener = new MyTestCacheListener();
@@ -4062,7 +4063,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testNonDefaultRegionAttributes() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setScope(Scope.DISTRIBUTED_NO_ACK);
@@ -4239,7 +4240,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testNestedRegions() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setScope(Scope.DISTRIBUTED_NO_ACK);
@@ -4291,7 +4292,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testDiskDirs() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
File[] dirs = new File[] {new File(getUniqueName() + "-dir1"),
@@ -4314,7 +4315,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testOverflowAndBackup() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setMirrorType(MirrorType.KEYS_VALUES);
@@ -4330,7 +4331,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
*/
@Test
public void testDiskWriteAttributes() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
// Set properties for Asynch writes
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
@@ -4387,7 +4388,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
LogWriterUtils.getLogWriter().info("Parsing " + xmlFile);
FileInputStream fis = new FileInputStream(xmlFile);
- CacheXmlParser.parse(fis);
+ CacheXmlParser.parse(fis, ModuleService.DEFAULT);
}
} else {
@@ -4395,24 +4396,24 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
File example = new File(createTempFileFromResource(getClass(),
"/org/apache/geode/cache/doc-files/example-cache.xml").getAbsolutePath());
FileInputStream fis = new FileInputStream(example);
- CacheXmlParser.parse(fis);
+ CacheXmlParser.parse(fis, ModuleService.DEFAULT);
File example2 = new File(createTempFileFromResource(getClass(),
"/org/apache/geode/cache/doc-files/example2-cache.xml").getAbsolutePath());
fis = new FileInputStream(example2);
- CacheXmlParser.parse(fis);
+ CacheXmlParser.parse(fis, ModuleService.DEFAULT);
File example3 = new File(createTempFileFromResource(getClass(),
"/org/apache/geode/cache/doc-files/example3-cache.xml").getAbsolutePath());
fis = new FileInputStream(example3);
- CacheXmlParser.parse(fis);
+ CacheXmlParser.parse(fis, ModuleService.DEFAULT);
}
}
@Test
public void testEvictionLRUEntryAttributes() throws Exception {
final String rName = getUniqueName();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setEvictionAttributes(
EvictionAttributes.createLRUEntryAttributes(80, EvictionAction.LOCAL_DESTROY));
@@ -4461,7 +4462,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testEvictionLRUMemoryAttributes() throws Exception {
final String rName = getUniqueName();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setEvictionAttributes(
EvictionAttributes.createLRUMemoryAttributes(10, new EvictionObjectSizer()));
@@ -4472,7 +4473,7 @@ public abstract class CacheXml66DUnitTest extends CacheXmlTestCase {
@Test
public void testEvictionLRUHeapAttributes() throws Exception {
final String rName = getUniqueName();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setEvictionAttributes(EvictionAttributes
.createLRUHeapAttributes(new EvictionObjectSizer(), EvictionAction.LOCAL_DESTROY));
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml70DUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml70DUnitTest.java
index 1b6cbb8..b4612bc 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml70DUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml70DUnitTest.java
@@ -41,6 +41,7 @@ import org.apache.geode.internal.cache.xmlcache.AsyncEventQueueCreation;
import org.apache.geode.internal.cache.xmlcache.CacheCreation;
import org.apache.geode.internal.cache.xmlcache.CacheXml;
import org.apache.geode.internal.cache.xmlcache.RegionAttributesCreation;
+import org.apache.geode.services.module.ModuleService;
public class CacheXml70DUnitTest extends CacheXml66DUnitTest {
@@ -53,7 +54,7 @@ public class CacheXml70DUnitTest extends CacheXml66DUnitTest {
/** make sure we can create regions with concurrencyChecksEnabled=true */
@Test
public void testConcurrencyChecksEnabled() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setScope(Scope.DISTRIBUTED_ACK);
attrs.setDataPolicy(DataPolicy.REPLICATE);
@@ -108,7 +109,7 @@ public class CacheXml70DUnitTest extends CacheXml66DUnitTest {
@Test
public void testGatewayConflictResolver() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
cache.setGatewayConflictResolver(new MyGatewayConflictResolver());
testXml(cache);
Cache c = getCache();
@@ -121,7 +122,7 @@ public class CacheXml70DUnitTest extends CacheXml66DUnitTest {
@Test
public void testAsyncEventQueue() throws Exception {
getSystem();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
String id = "WBCLChannel";
AsyncEventQueueFactory factory = cache.createAsyncEventQueueFactory();
@@ -156,7 +157,7 @@ public class CacheXml70DUnitTest extends CacheXml66DUnitTest {
@Test
public void testConcurrentAsyncEventQueue() throws Exception {
getSystem();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
String id = "WBCLChannel";
AsyncEventQueueFactory factory = cache.createAsyncEventQueueFactory();
@@ -194,7 +195,7 @@ public class CacheXml70DUnitTest extends CacheXml66DUnitTest {
@Test
public void testAsyncEventQueueWithGatewayEventFilter() throws Exception {
getSystem();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
String id = "WBCLChannel";
AsyncEventQueueFactory factory = cache.createAsyncEventQueueFactory();
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml80DUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml80DUnitTest.java
index 78a3975..b07d3dc 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml80DUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml80DUnitTest.java
@@ -48,6 +48,7 @@ import org.apache.geode.internal.cache.xmlcache.CacheXml;
import org.apache.geode.internal.cache.xmlcache.CacheXmlGenerator;
import org.apache.geode.internal.cache.xmlcache.DiskStoreAttributesCreation;
import org.apache.geode.internal.cache.xmlcache.RegionAttributesCreation;
+import org.apache.geode.services.module.ModuleService;
@SuppressWarnings("serial")
@@ -62,7 +63,7 @@ public class CacheXml80DUnitTest extends CacheXml70DUnitTest {
public void testCompressor() throws Exception {
final String regionName = "testCompressor";
- final CacheCreation cache = new CacheCreation();
+ final CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
final RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setCompressor(SnappyCompressor.getDefaultInstance());
/* Region regionBefore = */ cache.createRegion(regionName, attrs);
@@ -86,7 +87,7 @@ public class CacheXml80DUnitTest extends CacheXml70DUnitTest {
*/
@Test
public void testIndexXmlCreation() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setScope(Scope.DISTRIBUTED_ACK);
attrs.setDataPolicy(DataPolicy.REPLICATE);
@@ -182,7 +183,7 @@ public class CacheXml80DUnitTest extends CacheXml70DUnitTest {
@Test
public void testCacheServerDisableTcpNoDelay() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
CacheServer cs = cache.addCacheServer();
cs.setPort(0);
@@ -195,7 +196,7 @@ public class CacheXml80DUnitTest extends CacheXml70DUnitTest {
@Test
public void testCacheServerEnableTcpNoDelay() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
CacheServer cs = cache.addCacheServer();
cs.setPort(0);
@@ -208,7 +209,7 @@ public class CacheXml80DUnitTest extends CacheXml70DUnitTest {
@Test
public void testDiskUsage() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
DiskStoreAttributesCreation disk = new DiskStoreAttributesCreation();
disk.setDiskUsageWarningPercentage(97);
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml81DUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml81DUnitTest.java
index 631395e..92621a0 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml81DUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml81DUnitTest.java
@@ -33,6 +33,7 @@ import org.apache.geode.internal.cache.xmlcache.CacheCreation;
import org.apache.geode.internal.cache.xmlcache.CacheXml;
import org.apache.geode.internal.cache.xmlcache.RegionAttributesCreation;
import org.apache.geode.internal.cache.xmlcache.XmlParser;
+import org.apache.geode.services.module.ModuleService;
import org.apache.geode.test.dunit.IgnoredException;
/**
@@ -62,7 +63,7 @@ public class CacheXml81DUnitTest extends CacheXml80DUnitTest {
*/
@Test
public void testCacheExtension() throws Exception {
- final CacheCreation cache = new CacheCreation();
+ final CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
final MockCacheExtension extension = new MockCacheExtension("testCacheExtension");
cache.getExtensionPoint().addExtension(extension);
@@ -95,7 +96,7 @@ public class CacheXml81DUnitTest extends CacheXml80DUnitTest {
@Test
public void testRegionExtension() throws Exception {
final String regionName = "testRegionExtension";
- final CacheCreation cache = new CacheCreation();
+ final CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
final RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
Extensible<Region<?, ?>> region =
(Extensible<Region<?, ?>>) cache.createRegion(regionName, attrs);
@@ -133,7 +134,7 @@ public class CacheXml81DUnitTest extends CacheXml80DUnitTest {
@Test
public void testLocatorInException() throws Exception {
final String regionName = "testRegionExtension";
- final CacheCreation cache = new CacheCreation();
+ final CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
final RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
Extensible<Region<?, ?>> region =
(Extensible<Region<?, ?>>) cache.createRegion(regionName, attrs);
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXmlGeode10DUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXmlGeode10DUnitTest.java
index 72c9b05..6339d54 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXmlGeode10DUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXmlGeode10DUnitTest.java
@@ -47,6 +47,7 @@ import org.apache.geode.internal.cache.xmlcache.CacheXml;
import org.apache.geode.internal.cache.xmlcache.Declarable2;
import org.apache.geode.internal.cache.xmlcache.RegionAttributesCreation;
import org.apache.geode.internal.cache.xmlcache.ResourceManagerCreation;
+import org.apache.geode.services.module.ModuleService;
import org.apache.geode.test.dunit.IgnoredException;
import org.apache.geode.util.internal.GeodeGlossary;
@@ -65,7 +66,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest {
final String regionName = "testEnableOffHeapMemory";
- final CacheCreation cache = new CacheCreation();
+ final CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
final RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setOffHeap(true);
assertEquals(true, attrs.getOffHeap());
@@ -92,7 +93,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest {
throws Exception {
final String regionName = getUniqueName();
- final CacheCreation cache = new CacheCreation();
+ final CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
final RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setOffHeap(true);
assertEquals(true, attrs.getOffHeap());
@@ -126,7 +127,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest {
final String rootRegionName = getUniqueName();
final String subRegionName = "subRegion";
- final CacheCreation cache = new CacheCreation();
+ final CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
final RegionAttributesCreation rootRegionAttrs = new RegionAttributesCreation(cache);
assertEquals(false, rootRegionAttrs.getOffHeap());
@@ -167,7 +168,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest {
@Override
@Test
public void testResourceManagerThresholds() throws Exception {
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
final float low = 90.0f;
final float high = 95.0f;
@@ -257,7 +258,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest {
final String regionName = this.testName.getMethodName();
// Create AsyncEventQueue with Listener
- final CacheCreation cache = new CacheCreation();
+ final CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
AsyncEventQueueFactory factory = cache.createAsyncEventQueueFactory();
AsyncEventListener listener = new MyAsyncEventListenerGeode10();
@@ -308,7 +309,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest {
@Test
public void testPoolSocketFactory() throws IOException {
getSystem();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
PoolFactory f = cache.createPoolFactory();
f.setSocketFactory(new TestSocketFactory());
f.addServer("localhost", 443);
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/distributed/ServerLauncherIntegrationTestCase.java b/geode-core/src/integrationTest/java/org/apache/geode/distributed/ServerLauncherIntegrationTestCase.java
index e77d3ea..bc583d0 100755
--- a/geode-core/src/integrationTest/java/org/apache/geode/distributed/ServerLauncherIntegrationTestCase.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/distributed/ServerLauncherIntegrationTestCase.java
@@ -44,6 +44,7 @@ import org.apache.geode.internal.cache.xmlcache.CacheCreation;
import org.apache.geode.internal.cache.xmlcache.CacheXmlGenerator;
import org.apache.geode.internal.cache.xmlcache.RegionAttributesCreation;
import org.apache.geode.internal.process.ProcessType;
+import org.apache.geode.services.module.ModuleService;
/**
* Abstract base class for integration tests of {@link ServerLauncher}.
@@ -184,7 +185,7 @@ public abstract class ServerLauncherIntegrationTestCase extends LauncherIntegrat
}
private File writeCacheXml(final int serverPort) throws IOException {
- CacheCreation creation = new CacheCreation();
+ CacheCreation creation = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(creation);
attrs.setDataPolicy(DataPolicy.REPLICATE);
attrs.setScope(Scope.DISTRIBUTED_ACK);
@@ -203,7 +204,7 @@ public abstract class ServerLauncherIntegrationTestCase extends LauncherIntegrat
final String hostnameForClients, final int maxConnections, final int maxThreads,
final int maximumMessageCount, final int messageTimeToLive, final int socketBufferSize)
throws IOException {
- CacheCreation creation = new CacheCreation();
+ CacheCreation creation = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(creation);
attrs.setDataPolicy(DataPolicy.REPLICATE);
attrs.setScope(Scope.DISTRIBUTED_ACK);
@@ -227,7 +228,7 @@ public abstract class ServerLauncherIntegrationTestCase extends LauncherIntegrat
}
private File writeCacheXml() throws IOException {
- CacheCreation creation = new CacheCreation();
+ CacheCreation creation = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attrs = new RegionAttributesCreation(creation);
attrs.setDataPolicy(DataPolicy.REPLICATE);
attrs.setScope(Scope.DISTRIBUTED_ACK);
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/distributed/internal/InternalDistributedSystemJUnitTest.java b/geode-core/src/integrationTest/java/org/apache/geode/distributed/internal/InternalDistributedSystemJUnitTest.java
index 75ec5d1..6073836 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/distributed/internal/InternalDistributedSystemJUnitTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/distributed/internal/InternalDistributedSystemJUnitTest.java
@@ -801,7 +801,7 @@ public class InternalDistributedSystemJUnitTest {
createSystem(getCommonProperties(), metricsSessionBuilder);
- verify(metricsSessionBuilder).build(system, any());
+ verify(metricsSessionBuilder).build(system, ModuleService.DEFAULT);
}
@Test
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/xmlcache/CacheXmlGeneratorIntegrationTest.java b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/xmlcache/CacheXmlGeneratorIntegrationTest.java
index 350686c..d181dc0 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/xmlcache/CacheXmlGeneratorIntegrationTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/xmlcache/CacheXmlGeneratorIntegrationTest.java
@@ -34,6 +34,7 @@ import org.apache.geode.cache.Cache;
import org.apache.geode.cache.PartitionAttributes;
import org.apache.geode.cache.PartitionAttributesFactory;
import org.apache.geode.cache.Region;
+import org.apache.geode.services.module.ModuleService;
import org.apache.geode.test.junit.rules.ServerStarterRule;
@RunWith(Parameterized.class)
@@ -61,7 +62,7 @@ public class CacheXmlGeneratorIntegrationTest {
@Test
public void generateXmlForPartitionRegionWithOffHeapWhenDistributedSystemDoesNotExistShouldWorkProperly()
throws Exception {
- CacheCreation cacheCreation = new CacheCreation();
+ CacheCreation cacheCreation = new CacheCreation(ModuleService.DEFAULT);
RegionAttributesCreation attributes = new RegionAttributesCreation(cacheCreation);
attributes.setOffHeap(true);
attributes.setPartitionAttributes(partitionAttributes);
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParserJUnitTest.java b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParserJUnitTest.java
index 0876d6e..86391a2a 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParserJUnitTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParserJUnitTest.java
@@ -39,6 +39,7 @@ import org.apache.geode.cache.DiskStore;
import org.apache.geode.cache.client.ClientCache;
import org.apache.geode.cache.client.ClientCacheFactory;
import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.services.module.ModuleService;
/**
* Test cases for {@link CacheXmlParser}.
@@ -177,13 +178,15 @@ public class CacheXmlParserJUnitTest {
@Test
public void testDTDFallbackWithNonEnglishLocal() {
CacheXmlParser.parse(this.getClass().getResourceAsStream(
- "CacheXmlParserJUnitTest.testDTDFallbackWithNonEnglishLocal.cache.xml"));
+ "CacheXmlParserJUnitTest.testDTDFallbackWithNonEnglishLocal.cache.xml"),
+ ModuleService.DEFAULT);
final Locale previousLocale = Locale.getDefault();
try {
Locale.setDefault(Locale.JAPAN);
CacheXmlParser.parse(this.getClass().getResourceAsStream(
- "CacheXmlParserJUnitTest.testDTDFallbackWithNonEnglishLocal.cache.xml"));
+ "CacheXmlParserJUnitTest.testDTDFallbackWithNonEnglishLocal.cache.xml"),
+ ModuleService.DEFAULT);
} finally {
Locale.setDefault(previousLocale);
}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
index 3cd270c..6881562 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
@@ -4394,11 +4394,11 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
writer.write(replacedXmlString);
writer.flush();
- xml = CacheXmlParser.parse(new ByteArrayInputStream(baos.toByteArray()));
+ xml = CacheXmlParser.parse(new ByteArrayInputStream(baos.toByteArray()), moduleService);
} else {
- xml = CacheXmlParser.parse(is);
+ xml = CacheXmlParser.parse(is, moduleService);
}
- xml.create(this, moduleService);
+ xml.create(this);
} catch (IOException e) {
throw new CacheXmlException(
"Input Stream could not be read for system property substitutions.", e);
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java
index d48a184..5a601d1 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java
@@ -330,8 +330,8 @@ public class CacheCreation implements InternalCache {
/**
* Creates a new {@code CacheCreation} with no root regions
*/
- public CacheCreation() {
- this(false);
+ public CacheCreation(ModuleService moduleService) {
+ this(false, moduleService);
}
/**
@@ -340,7 +340,8 @@ public class CacheCreation implements InternalCache {
*
* @since GemFire 5.7
*/
- public CacheCreation(boolean forParsing) {
+ public CacheCreation(boolean forParsing, ModuleService moduleService) {
+ this.moduleService = moduleService;
initializeRegionShortcuts();
if (!forParsing) {
createInProgress.set(poolManager);
@@ -478,11 +479,10 @@ public class CacheCreation implements InternalCache {
/**
* Fills in the contents of a {@link Cache} based on this creation object's state.
*/
- void create(InternalCache cache, ModuleService moduleService)
+ void create(InternalCache cache)
throws TimeoutException, CacheWriterException, GatewayException, RegionExistsException,
QueryConfigurationServiceException {
- this.moduleService = moduleService;
extensionPoint.beforeCreate(cache);
cache.setDeclarativeCacheConfig(cacheConfig);
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlGenerator.java b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlGenerator.java
index ea19b88..439696b 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlGenerator.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlGenerator.java
@@ -285,7 +285,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
} else {
// if we are not generating defaults then create the CacheCreation for parsing
// so that we can fetch the actual PoolManager and not a fake.
- creation = new CacheCreation(!generateDefaults);
+ creation = new CacheCreation(!generateDefaults, moduleService);
if (generateDefaults() || cache.getLockLease() != GemFireCacheImpl.DEFAULT_LOCK_LEASE) {
creation.setLockLease(cache.getLockLease());
}
@@ -306,7 +306,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
} else {
// if we are not generating defaults then create the CacheCreation for parsing
// so that we can fetch the actual PoolManager and not a fake.
- creation = new CacheCreation(!generateDefaults);
+ creation = new CacheCreation(!generateDefaults, moduleService);
if (generateDefaults() || cache.getLockLease() != GemFireCacheImpl.DEFAULT_LOCK_LEASE) {
creation.setLockLease(cache.getLockLease());
}
@@ -366,7 +366,7 @@ public class CacheXmlGenerator extends CacheXml implements XMLReader {
version = CacheXmlVersion.valueForVersion(VERSION_LATEST);
generateDefaults = true;
- creation = new CacheCreation();
+ creation = new CacheCreation(moduleService);
creation.setLockLease(GemFireCacheImpl.DEFAULT_LOCK_LEASE);
creation.setLockTimeout(GemFireCacheImpl.DEFAULT_LOCK_TIMEOUT);
creation.setSearchTimeout(GemFireCacheImpl.DEFAULT_SEARCH_TIMEOUT);
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParser.java b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParser.java
index 0892060..4b4f09d 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParser.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParser.java
@@ -187,7 +187,7 @@ public class CacheXmlParser extends CacheXml implements ContentHandler {
* @since GemFire 4.0
*
*/
- public static CacheXmlParser parse(InputStream is) {
+ public static CacheXmlParser parse(InputStream is, ModuleService moduleService) {
/*
* The API doc http://java.sun.com/javase/6/docs/api/org/xml/sax/InputSource.html for the SAX
@@ -209,6 +209,7 @@ public class CacheXmlParser extends CacheXml implements ContentHandler {
}
CacheXmlParser handler = new CacheXmlParser();
+ handler.init(moduleService);
try {
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setFeature(DISALLOW_DOCTYPE_DECL_FEATURE, true);
@@ -329,14 +330,14 @@ public class CacheXmlParser extends CacheXml implements ContentHandler {
/**
* Creates cache artifacts ({@link Cache}s, etc.) based upon the XML parsed by this parser.
*/
- public void create(InternalCache cache, ModuleService moduleService)
+ public void create(InternalCache cache)
throws TimeoutException, GatewayException, CacheWriterException, RegionExistsException {
if (this.cache == null) {
String s = "A cache or client-cache element is required";
throw new CacheXmlException(
"No cache element specified.");
}
- this.cache.create(cache, moduleService);
+ this.cache.create(cache);
}
/**
@@ -347,7 +348,7 @@ public class CacheXmlParser extends CacheXml implements ContentHandler {
if (this.cache != null) {
throw new CacheXmlException("Only a single cache or client-cache element is allowed");
}
- this.cache = new CacheCreation(true);
+ this.cache = new CacheCreation(true, moduleService);
String lockLease = atts.getValue(LOCK_LEASE);
if (lockLease != null) {
this.cache.setLockLease(parseInt(lockLease));
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/ClientCacheCreation.java b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/ClientCacheCreation.java
index 151da77..66c2759 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/ClientCacheCreation.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/ClientCacheCreation.java
@@ -76,7 +76,7 @@ public class ClientCacheCreation extends CacheCreation implements ClientCache {
* @since GemFire 5.7
*/
ClientCacheCreation(boolean forParsing) {
- super(forParsing);
+ super(forParsing, ModuleService.DEFAULT);
}
@Immutable
@@ -170,7 +170,7 @@ public class ClientCacheCreation extends CacheCreation implements ClientCache {
* Fills in the contents of a {@link Cache} based on this creation object's state.
*/
@Override
- void create(InternalCache cache, ModuleService moduleService)
+ void create(InternalCache cache)
throws TimeoutException, CacheWriterException, GatewayException, RegionExistsException {
cache.setDeclarativeCacheConfig(this.getCacheConfig());
if (!cache.isClient()) {
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/CacheCreationTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/CacheCreationTest.java
index 58a8a4c..bc33fd7 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/CacheCreationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/CacheCreationTest.java
@@ -73,7 +73,7 @@ public class CacheCreationTest {
@Test
public void verifyRunInitializerWithInitializerAndNullPropsCallsInitAndInitialize() {
- CacheCreation cacheCreation = new CacheCreation();
+ CacheCreation cacheCreation = new CacheCreation(ModuleService.DEFAULT);
Declarable initializer = mock(Declarable.class);
Properties props = null;
cacheCreation.setInitializer(initializer, props);
@@ -86,7 +86,7 @@ public class CacheCreationTest {
@Test
public void verifyRunInitializerWithInitializerAndPropsCallsInitAndInitialize() {
- CacheCreation cacheCreation = new CacheCreation();
+ CacheCreation cacheCreation = new CacheCreation(ModuleService.DEFAULT);
Declarable initializer = mock(Declarable.class);
Properties props = new Properties();
props.setProperty("key", "value");
@@ -100,7 +100,7 @@ public class CacheCreationTest {
@Test
public void verifyInitializeDeclarablesMapWithNoDeclarablesPassesEmptyMap() {
- CacheCreation cacheCreation = new CacheCreation();
+ CacheCreation cacheCreation = new CacheCreation(ModuleService.DEFAULT);
cacheCreation.initializeDeclarablesMap(cache);
@@ -109,7 +109,7 @@ public class CacheCreationTest {
@Test
public void verifyInitializeDeclarablesMapWithDeclarablesPassesExpectedMap() {
- CacheCreation cacheCreation = new CacheCreation();
+ CacheCreation cacheCreation = new CacheCreation(ModuleService.DEFAULT);
Map<Declarable, Properties> expected = new HashMap<>();
Declarable declarable1 = mock(Declarable.class);
cacheCreation.addDeclarableProperties(declarable1, null);
@@ -127,7 +127,7 @@ public class CacheCreationTest {
@Test
public void verifyInitializeDeclarablesMapWithDeclarableCallInitAndInitialize() {
- CacheCreation cacheCreation = new CacheCreation();
+ CacheCreation cacheCreation = new CacheCreation(ModuleService.DEFAULT);
Declarable declarable = mock(Declarable.class);
Properties properties = new Properties();
properties.setProperty("k2", "v2");
@@ -141,7 +141,7 @@ public class CacheCreationTest {
@Test
public void verifyInitializeDeclarablesMapWithDeclarableThatThrowsWillThrowCacheXmlException() {
- CacheCreation cacheCreation = new CacheCreation();
+ CacheCreation cacheCreation = new CacheCreation(ModuleService.DEFAULT);
Declarable declarable = mock(Declarable.class);
Properties properties = null;
cacheCreation.addDeclarableProperties(declarable, properties);
@@ -156,7 +156,7 @@ public class CacheCreationTest {
@Test
public void declarativeRegionIsCreated() {
- CacheCreation cacheCreation = new CacheCreation();
+ CacheCreation cacheCreation = new CacheCreation(ModuleService.DEFAULT);
RegionCreation declarativeRegion = mock(RegionCreation.class);
Map<String, Region<?, ?>> declarativeRegions = new HashMap<>();
declarativeRegions.put("testRegion", declarativeRegion);
@@ -168,7 +168,7 @@ public class CacheCreationTest {
@Test
public void defaultCacheServerIsNotCreatedWithDefaultPortWhenNoDeclarativeServerIsConfigured() {
- CacheCreation cacheCreation = new CacheCreation();
+ CacheCreation cacheCreation = new CacheCreation(ModuleService.DEFAULT);
cacheCreation.startCacheServers(cacheCreation.getCacheServers(), cache,
ServerLauncherParameters.INSTANCE.withDisableDefaultServer(false));
@@ -178,7 +178,7 @@ public class CacheCreationTest {
@Test
public void defaultCacheServerIsNotCreatedWhenDisableDefaultCacheServerIsTrue() {
- CacheCreation cacheCreation = new CacheCreation();
+ CacheCreation cacheCreation = new CacheCreation(ModuleService.DEFAULT);
cacheCreation.startCacheServers(cacheCreation.getCacheServers(), cache,
ServerLauncherParameters.INSTANCE.withDisableDefaultServer(false));
@@ -188,7 +188,7 @@ public class CacheCreationTest {
@Test
public void defaultCacheServerIsCreatedWithConfiguredPortWhenNoDeclarativeServerIsConfigured() {
- CacheCreation cacheCreation = new CacheCreation();
+ CacheCreation cacheCreation = new CacheCreation(ModuleService.DEFAULT);
CacheServerImpl mockServer = mock(CacheServerImpl.class);
when(cache.addCacheServer()).thenReturn(mockServer);
List<CacheServer> cacheServers = new ArrayList<>();
@@ -206,7 +206,7 @@ public class CacheCreationTest {
@Test
public void declarativeCacheServerIsCreatedWithConfiguredServerPort() {
- CacheCreation cacheCreation = new CacheCreation();
+ CacheCreation cacheCreation = new CacheCreation(ModuleService.DEFAULT);
CacheServer cacheServer = new CacheServerCreation(cacheCreation, false);
cacheServer.setPort(8888);
cacheCreation.getCacheServers().add(cacheServer);
@@ -225,7 +225,7 @@ public class CacheCreationTest {
@Test
public void cacheServerCreationIsSkippedWhenAServerExistsForAGivenPort() {
- CacheCreation cacheCreation = new CacheCreation();
+ CacheCreation cacheCreation = new CacheCreation(ModuleService.DEFAULT);
CacheServer cacheServer = new CacheServerCreation(cacheCreation, false);
cacheServer.setPort(40406);
cacheCreation.getCacheServers().add(cacheServer);
@@ -243,7 +243,7 @@ public class CacheCreationTest {
@Test
public void userCanCreateMultipleCacheServersDeclaratively() {
- CacheCreation cacheCreation = new CacheCreation();
+ CacheCreation cacheCreation = new CacheCreation(ModuleService.DEFAULT);
CacheServer cacheServer1 = new CacheServerCreation(cacheCreation, false);
cacheServer1.setPort(40406);
CacheServer cacheServer2 = new CacheServerCreation(cacheCreation, false);
@@ -263,7 +263,7 @@ public class CacheCreationTest {
@Test
public void shouldThrowExceptionWhenUserTriesToDeclareMultipleCacheServersWithPort() {
- CacheCreation cacheCreation = new CacheCreation();
+ CacheCreation cacheCreation = new CacheCreation(ModuleService.DEFAULT);
cacheCreation.getCacheServers().add(new CacheServerCreation(cacheCreation, false));
cacheCreation.getCacheServers().add(new CacheServerCreation(cacheCreation, false));
int configuredServerPort = 50505;
@@ -282,7 +282,7 @@ public class CacheCreationTest {
@Test
public void shouldCreateGatewaySenderAfterRegions() {
- CacheCreation cacheCreation = new CacheCreation();
+ CacheCreation cacheCreation = new CacheCreation(ModuleService.DEFAULT);
GatewayReceiver receiver = mock(GatewayReceiver.class);
cacheCreation.addGatewayReceiver(receiver);
cacheCreation.addRootRegion(new RegionCreation(cacheCreation, "region"));
@@ -300,7 +300,7 @@ public class CacheCreationTest {
@Test
public void serverLauncherParametersShouldOverrideDefaultSettings() {
- CacheCreation cacheCreation = new CacheCreation();
+ CacheCreation cacheCreation = new CacheCreation(ModuleService.DEFAULT);
CacheServer cacheServerCreation = new CacheServerCreation(cacheCreation, false);
cacheCreation.getCacheServers().add(cacheServerCreation);
CacheServerImpl mockServer = mock(CacheServerImpl.class);
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/RegionCreationJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/RegionCreationJUnitTest.java
index 8984ffe..159f040 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/RegionCreationJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/RegionCreationJUnitTest.java
@@ -39,7 +39,7 @@ public class RegionCreationJUnitTest {
*/
@Test
public void testGetExtensionPoint() {
- final CacheCreation cache = new CacheCreation();
+ final CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
final RegionCreation region = new RegionCreation(cache, "test");
final ExtensionPoint<Region<?, ?>> extensionPoint = region.getExtensionPoint();
assertNotNull(extensionPoint);
diff --git a/geode-dunit/src/main/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java b/geode-dunit/src/main/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java
index 7c0b078..3c5ea1a 100644
--- a/geode-dunit/src/main/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java
+++ b/geode-dunit/src/main/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java
@@ -50,6 +50,7 @@ import org.apache.geode.internal.cache.LocalRegion;
import org.apache.geode.internal.cache.xmlcache.CacheCreation;
import org.apache.geode.internal.cache.xmlcache.CacheXmlGenerator;
import org.apache.geode.logging.internal.log4j.api.LogService;
+import org.apache.geode.services.module.ModuleService;
import org.apache.geode.test.dunit.IgnoredException;
import org.apache.geode.test.dunit.Invoke;
import org.apache.geode.test.dunit.VM;
@@ -141,7 +142,7 @@ public abstract class JUnit4CacheTestCase extends JUnit4DistributedTestCase
*/
public static synchronized void beginCacheXml() {
closeCache();
- cache = new TestCacheCreation();
+ cache = new TestCacheCreation(ModuleService.DEFAULT);
}
/**
@@ -577,6 +578,15 @@ public abstract class JUnit4CacheTestCase extends JUnit4DistributedTestCase
private static class TestCacheCreation extends CacheCreation {
private boolean closed = false;
+ public TestCacheCreation(ModuleService moduleService) {
+ super(moduleService);
+ }
+
+ public TestCacheCreation(boolean forParsing,
+ ModuleService moduleService) {
+ super(forParsing, moduleService);
+ }
+
@Override
public void close() {
this.closed = true;
diff --git a/geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/CacheXmlRule.java b/geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/CacheXmlRule.java
index 5f5170d..88994a2 100644
--- a/geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/CacheXmlRule.java
+++ b/geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/CacheXmlRule.java
@@ -33,6 +33,7 @@ import org.apache.geode.internal.cache.GemFireCacheImpl;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.internal.cache.xmlcache.CacheCreation;
import org.apache.geode.internal.cache.xmlcache.CacheXmlGenerator;
+import org.apache.geode.services.module.ModuleService;
import org.apache.geode.test.dunit.SerializableRunnableIF;
import org.apache.geode.test.dunit.VM;
import org.apache.geode.test.junit.rules.serializable.SerializableTemporaryFolder;
@@ -125,7 +126,7 @@ public class CacheXmlRule extends AbstractDistributedRule {
}
private void invokeBefore() throws Exception {
- DELEGATE.set(new CacheXmlCreation(createCache.get(), temporaryFolder));
+ DELEGATE.set(new CacheXmlCreation(createCache.get(), temporaryFolder, ModuleService.DEFAULT));
}
private void invokeAfter() {
@@ -153,7 +154,8 @@ public class CacheXmlRule extends AbstractDistributedRule {
private final SerializableTemporaryFolder temporaryFolder;
CacheXmlCreation(SerializableRunnableIF createCache,
- SerializableTemporaryFolder temporaryFolder) {
+ SerializableTemporaryFolder temporaryFolder, ModuleService moduleService) {
+ super(moduleService);
this.createCache = createCache;
this.temporaryFolder = temporaryFolder;
}
diff --git a/geode-experimental-driver/build.gradle b/geode-experimental-driver/build.gradle
index 3ae9b9c..6af9b77 100644
--- a/geode-experimental-driver/build.gradle
+++ b/geode-experimental-driver/build.gradle
@@ -30,6 +30,7 @@ dependencies {
exclude module: 'geode-core'
}
testImplementation(project(':geode-protobuf'))
+ integrationTestImplementation(project(':geode-common-services'))
integrationTestImplementation(project(':geode-core'))
integrationTestImplementation(project(':geode-dunit')) {
exclude module: 'geode-core'
diff --git a/geode-gfsh/src/main/resources/org/apache/geode/management/internal/sanctioned-geode-gfsh-serializables.txt b/geode-gfsh/src/main/resources/org/apache/geode/management/internal/sanctioned-geode-gfsh-serializables.txt
index 28eb107..eae9d94 100644
--- a/geode-gfsh/src/main/resources/org/apache/geode/management/internal/sanctioned-geode-gfsh-serializables.txt
+++ b/geode-gfsh/src/main/resources/org/apache/geode/management/internal/sanctioned-geode-gfsh-serializables.txt
@@ -47,9 +47,9 @@ org/apache/geode/management/internal/cli/functions/DataCommandFunction,true,1,op
org/apache/geode/management/internal/cli/functions/DeployFunction,true,1
org/apache/geode/management/internal/cli/functions/DescribeDiskStoreFunction,false
org/apache/geode/management/internal/cli/functions/DescribeQueryServiceFunction,true,8283480284191516847
-org/apache/geode/management/internal/cli/functions/DestroyAsyncEventQueueFunction,true,-7754359270344102817
+org/apache/geode/management/internal/cli/functions/DestroyAsyncEventQueueFunction,true,-7754359270344102817,moduleService:org/apache/geode/services/module/ModuleService
org/apache/geode/management/internal/cli/functions/DestroyAsyncEventQueueFunctionArgs,true,1755045410754561928,id:java/lang/String,ifExists:boolean
-org/apache/geode/management/internal/cli/functions/DestroyDiskStoreFunction,true,1
+org/apache/geode/management/internal/cli/functions/DestroyDiskStoreFunction,true,1,moduleService:org/apache/geode/services/module/ModuleService
org/apache/geode/management/internal/cli/functions/DestroyDiskStoreFunctionArgs,true,2296397958405313306,id:java/lang/String,ifExists:boolean
org/apache/geode/management/internal/cli/functions/DestroyGatewayReceiverFunction,true,1490927519860899562
org/apache/geode/management/internal/cli/functions/DestroyIndexFunction,true,-868082551095130315
@@ -58,12 +58,12 @@ org/apache/geode/management/internal/cli/functions/ExportConfigFunction,true,1
org/apache/geode/management/internal/cli/functions/ExportDataFunction,true,1
org/apache/geode/management/internal/cli/functions/ExportLogsFunction,true,1
org/apache/geode/management/internal/cli/functions/ExportLogsFunction$Args,false,endTime:java/time/LocalDateTime,includeLogs:boolean,includeStats:boolean,logLevel:org/apache/logging/log4j/Level,startTime:java/time/LocalDateTime,thisLogLevelOnly:boolean
-org/apache/geode/management/internal/cli/functions/FetchRegionAttributesFunction,true,4366812590788342070
+org/apache/geode/management/internal/cli/functions/FetchRegionAttributesFunction,true,4366812590788342070,moduleService:org/apache/geode/services/module/ModuleService
org/apache/geode/management/internal/cli/functions/FetchSharedConfigurationStatusFunction,true,1
org/apache/geode/management/internal/cli/functions/GarbageCollectionFunction,true,1
org/apache/geode/management/internal/cli/functions/GatewayReceiverCreateFunction,true,8746830191680509335
org/apache/geode/management/internal/cli/functions/GatewaySenderCreateFunction,true,8746830191680509335
-org/apache/geode/management/internal/cli/functions/GatewaySenderDestroyFunction,true,1
+org/apache/geode/management/internal/cli/functions/GatewaySenderDestroyFunction,true,1,moduleService:org/apache/geode/services/module/ModuleService
org/apache/geode/management/internal/cli/functions/GatewaySenderDestroyFunctionArgs,true,3848480256348119530,id:java/lang/String,ifExists:boolean
org/apache/geode/management/internal/cli/functions/GatewaySenderFunctionArgs,true,4636678328980816780,alertThreshold:java/lang/Integer,batchSize:java/lang/Integer,batchTimeInterval:java/lang/Integer,diskStoreName:java/lang/String,diskSynchronous:java/lang/Boolean,dispatcherThreads:java/lang/Integer,enableBatchConflation:java/lang/Boolean,enablePersistence:java/lang/Boolean,gatewayEventFilters:java/util/List,gatewayTransportFilters:java/util/List,groupTransactionEvents:java/lang/Boolean,i [...]
org/apache/geode/management/internal/cli/functions/GetMemberConfigInformationFunction,true,1
@@ -84,8 +84,8 @@ org/apache/geode/management/internal/cli/functions/NetstatFunction$NetstatFuncti
org/apache/geode/management/internal/cli/functions/NetstatFunction$NetstatFunctionResult,true,1,compressedBytes:org/apache/geode/management/internal/cli/CliUtil$DeflaterInflaterData,headerInfo:java/lang/String,host:java/lang/String
org/apache/geode/management/internal/cli/functions/RegionAlterFunction,true,-4846425364943216425
org/apache/geode/management/internal/cli/functions/RegionAttributesWrapper,true,-5517424520268271436,cacheListenerClasses:java/util/List,cacheLoaderClass:org/apache/geode/management/configuration/ClassName,cacheWriterClass:org/apache/geode/management/configuration/ClassName,compressorClass:java/lang/String,keyConstraintClass:java/lang/String,regionAttributes:org/apache/geode/cache/RegionAttributes,valueConstraintClass:java/lang/String
-org/apache/geode/management/internal/cli/functions/RegionCreateFunction,true,8746830191680509335
-org/apache/geode/management/internal/cli/functions/RegionDestroyFunction,true,9172773671865750685
+org/apache/geode/management/internal/cli/functions/RegionCreateFunction,true,8746830191680509335,moduleService:org/apache/geode/services/module/ModuleService
+org/apache/geode/management/internal/cli/functions/RegionDestroyFunction,true,9172773671865750685,moduleService:org/apache/geode/services/module/ModuleService
org/apache/geode/management/internal/cli/functions/RegionFunctionArgs,true,2204943186081037302,asyncEventQueueIds:java/util/Set,cacheListeners:java/util/Set,cacheLoader:org/apache/geode/management/configuration/ClassName,cacheWriter:org/apache/geode/management/configuration/ClassName,cloningEnabled:java/lang/Boolean,compressor:java/lang/String,concurrencyChecksEnabled:java/lang/Boolean,concurrencyLevel:java/lang/Integer,diskStore:java/lang/String,diskSynchronous:java/lang/Boolean,enableA [...]
org/apache/geode/management/internal/cli/functions/RegionFunctionArgs$EvictionAttrs,true,9015454906371076014,evictionAction:java/lang/String,maxEntryCount:java/lang/Integer,maxMemory:java/lang/Integer,objectSizer:java/lang/String
org/apache/geode/management/internal/cli/functions/RegionFunctionArgs$ExpirationAttrs,true,1474255033398008063,action:org/apache/geode/cache/ExpirationAction,time:java/lang/Integer
diff --git a/geode-lucene/src/integrationTest/java/org/apache/geode/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java b/geode-lucene/src/integrationTest/java/org/apache/geode/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java
index 1673d95..c6f46c5 100644
--- a/geode-lucene/src/integrationTest/java/org/apache/geode/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java
+++ b/geode-lucene/src/integrationTest/java/org/apache/geode/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java
@@ -53,6 +53,7 @@ import org.apache.geode.internal.cache.extension.Extension;
import org.apache.geode.internal.cache.xmlcache.CacheCreation;
import org.apache.geode.internal.cache.xmlcache.CacheXmlParser;
import org.apache.geode.internal.cache.xmlcache.RegionCreation;
+import org.apache.geode.services.module.ModuleService;
import org.apache.geode.test.junit.categories.LuceneTest;
@Category({LuceneTest.class})
@@ -169,7 +170,8 @@ public class LuceneIndexXmlParserIntegrationJUnitTest {
}
private RegionCreation createRegionCreation(String regionName) throws FileNotFoundException {
- CacheXmlParser parser = CacheXmlParser.parse(new FileInputStream(getXmlFileForTest()));
+ CacheXmlParser parser =
+ CacheXmlParser.parse(new FileInputStream(getXmlFileForTest()), ModuleService.DEFAULT);
CacheCreation cacheCreation = parser.getCacheCreation();
// Some of the tests in this class needs to have the declarables initialized.
// cacheCreation.create(InternalCache) would do this but it was too much work
diff --git a/geode-lucene/src/main/resources/org/apache/geode/internal/sanctioned-geode-lucene-serializables.txt b/geode-lucene/src/main/resources/org/apache/geode/internal/sanctioned-geode-lucene-serializables.txt
index 019dc9a..4844ba4 100755
--- a/geode-lucene/src/main/resources/org/apache/geode/internal/sanctioned-geode-lucene-serializables.txt
+++ b/geode-lucene/src/main/resources/org/apache/geode/internal/sanctioned-geode-lucene-serializables.txt
@@ -10,7 +10,7 @@ org/apache/geode/cache/lucene/internal/cli/LuceneIndexInfo,true,1,fieldAnalyzers
org/apache/geode/cache/lucene/internal/cli/LuceneIndexStatus,false
org/apache/geode/cache/lucene/internal/cli/LuceneQueryInfo,true,1,defaultField:java/lang/String,keysOnly:boolean,limit:int,queryString:java/lang/String
org/apache/geode/cache/lucene/internal/cli/LuceneSearchResults,false,exceptionFlag:boolean,exceptionMessage:java/lang/String,key:java/lang/String,score:float,value:java/lang/String
-org/apache/geode/cache/lucene/internal/cli/functions/LuceneCreateIndexFunction,true,3061443846664615818
+org/apache/geode/cache/lucene/internal/cli/functions/LuceneCreateIndexFunction,true,3061443846664615818,moduleService:org/apache/geode/services/module/ModuleService
org/apache/geode/cache/lucene/internal/cli/functions/LuceneDescribeIndexFunction,true,1776072528558670172
org/apache/geode/cache/lucene/internal/cli/functions/LuceneDestroyIndexFunction,false
org/apache/geode/cache/lucene/internal/cli/functions/LuceneListIndexFunction,true,-2320432506763893879
@@ -20,4 +20,4 @@ org/apache/geode/cache/lucene/internal/distributed/IndexingInProgressFunction,tr
org/apache/geode/cache/lucene/internal/distributed/LuceneQueryFunction,true,1
org/apache/geode/cache/lucene/internal/distributed/WaitUntilFlushedFunction,true,1
org/apache/geode/cache/lucene/internal/results/LuceneGetPageFunction,true,1
-org/apache/geode/cache/lucene/management/configuration/Index,false,field:java/util/List,name:java/lang/String,serializer:org/apache/geode/cache/configuration/DeclarableType
\ No newline at end of file
+org/apache/geode/cache/lucene/management/configuration/Index,false,field:java/util/List,name:java/lang/String,serializer:org/apache/geode/cache/configuration/DeclarableType
diff --git a/geode-membership/src/integrationTest/java/org/apache/geode/distributed/internal/membership/MembershipDependenciesJUnitTest.java b/geode-membership/src/integrationTest/java/org/apache/geode/distributed/internal/membership/MembershipDependenciesJUnitTest.java
index a1b1260..e287583 100644
--- a/geode-membership/src/integrationTest/java/org/apache/geode/distributed/internal/membership/MembershipDependenciesJUnitTest.java
+++ b/geode-membership/src/integrationTest/java/org/apache/geode/distributed/internal/membership/MembershipDependenciesJUnitTest.java
@@ -57,6 +57,7 @@ public class MembershipDependenciesJUnitTest {
.or(resideInAPackage("org.apache.geode.distributed.internal.tcpserver.."))
.or(resideInAPackage("org.apache.geode.internal.inet.."))
.or(resideInAPackage("org.apache.geode.internal.lang.."))
+ .or(resideInAPackage(" org.apache.geode.services.module.."))
.or(not(resideInAPackage("org.apache.geode..")))
.or(type(AvailablePortHelper.class))
diff --git a/geode-membership/src/integrationTest/java/org/apache/geode/distributed/internal/membership/api/MembershipAPIArchUnitTest.java b/geode-membership/src/integrationTest/java/org/apache/geode/distributed/internal/membership/api/MembershipAPIArchUnitTest.java
index f480641..c412d62 100644
--- a/geode-membership/src/integrationTest/java/org/apache/geode/distributed/internal/membership/api/MembershipAPIArchUnitTest.java
+++ b/geode-membership/src/integrationTest/java/org/apache/geode/distributed/internal/membership/api/MembershipAPIArchUnitTest.java
@@ -50,6 +50,7 @@ public class MembershipAPIArchUnitTest {
// Serialization is a dependency of membership
.or(resideInAPackage("org.apache.geode.internal.serialization.."))
.or(resideInAPackage("org.apache.geode.distributed.internal.tcpserver.."))
+ .or(resideInAPackage(" org.apache.geode.services.module.."))
// allowed implementation class accesses
.or(type(MembershipBuilderImpl.class))
.or(type(MembershipLocatorBuilderImpl.class))
diff --git a/geode-rebalancer/build.gradle b/geode-rebalancer/build.gradle
index 9101577..86edc17 100644
--- a/geode-rebalancer/build.gradle
+++ b/geode-rebalancer/build.gradle
@@ -42,6 +42,7 @@ dependencies {
testImplementation('org.assertj:assertj-core')
testImplementation('org.mockito:mockito-core')
+ integrationTestImplementation(project(':geode-common-services'))
integrationTestImplementation('junit:junit')
integrationTestImplementation('org.awaitility:awaitility')
integrationTestImplementation('org.hamcrest:hamcrest-all')
diff --git a/geode-wan/src/distributedTest/java/org/apache/geode/cache/CacheXml70GatewayDUnitTest.java b/geode-wan/src/distributedTest/java/org/apache/geode/cache/CacheXml70GatewayDUnitTest.java
index c9e8b92..c9f39e2 100644
--- a/geode-wan/src/distributedTest/java/org/apache/geode/cache/CacheXml70GatewayDUnitTest.java
+++ b/geode-wan/src/distributedTest/java/org/apache/geode/cache/CacheXml70GatewayDUnitTest.java
@@ -60,7 +60,7 @@ public class CacheXml70GatewayDUnitTest extends CacheXmlTestCase {
@Test
public void testAsyncEventQueueWithGatewayEventFilter() throws Exception {
getSystem();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
String id = "WBCLChannel";
AsyncEventQueueFactory factory = cache.createAsyncEventQueueFactory();
@@ -96,7 +96,7 @@ public class CacheXml70GatewayDUnitTest extends CacheXmlTestCase {
@Test
public void testGatewayReceiver() throws Exception {
getSystem();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
GatewayReceiverFactory gatewayReceiverFactory = cache.createGatewayReceiverFactory();
gatewayReceiverFactory.setBindAddress("");
@@ -124,7 +124,7 @@ public class CacheXml70GatewayDUnitTest extends CacheXmlTestCase {
@Test
public void testParallelGatewaySender() throws Exception {
getSystem();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
GatewaySenderFactory gatewaySenderFactory = cache.createGatewaySenderFactory();
gatewaySenderFactory.setParallel(true);
@@ -162,7 +162,7 @@ public class CacheXml70GatewayDUnitTest extends CacheXmlTestCase {
@Test
public void testSerialGatewaySender() throws Exception {
getSystem();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
GatewaySenderFactory gatewaySenderFactory = cache.createGatewaySenderFactory();
gatewaySenderFactory.setParallel(false);
gatewaySenderFactory.setManualStart(true);
diff --git a/geode-wan/src/distributedTest/java/org/apache/geode/cache/CacheXml80GatewayDUnitTest.java b/geode-wan/src/distributedTest/java/org/apache/geode/cache/CacheXml80GatewayDUnitTest.java
index e49787f..15b13d9 100644
--- a/geode-wan/src/distributedTest/java/org/apache/geode/cache/CacheXml80GatewayDUnitTest.java
+++ b/geode-wan/src/distributedTest/java/org/apache/geode/cache/CacheXml80GatewayDUnitTest.java
@@ -50,7 +50,7 @@ public class CacheXml80GatewayDUnitTest extends CacheXmlTestCase {
@Test
public void testGatewayReceiverWithManualStartTRUE() throws Exception {
// getSystem();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
GatewayReceiverFactory gatewayReceiverFactory = cache.createGatewayReceiverFactory();
gatewayReceiverFactory.setBindAddress("");
@@ -79,7 +79,7 @@ public class CacheXml80GatewayDUnitTest extends CacheXmlTestCase {
@Test
public void testAsyncEventQueueWithSubstitutionFilter() throws Exception {
getSystem();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
// Create an AsyncEventQueue with GatewayEventSubstitutionFilter.
String id = getName();
@@ -104,7 +104,7 @@ public class CacheXml80GatewayDUnitTest extends CacheXmlTestCase {
@Test
public void testGatewaySenderWithSubstitutionFilter() throws Exception {
getSystem();
- CacheCreation cache = new CacheCreation();
+ CacheCreation cache = new CacheCreation(ModuleService.DEFAULT);
// Create a GatewaySender with GatewayEventSubstitutionFilter.
// Don't start the sender to avoid 'Locators must be configured before starting gateway-sender'
diff --git a/geode-wan/src/integrationTest/java/org/apache/geode/internal/cache/wan/GatewayReceiverXmlParsingValidationsJUnitTest.java b/geode-wan/src/integrationTest/java/org/apache/geode/internal/cache/wan/GatewayReceiverXmlParsingValidationsJUnitTest.java
index 369421b..d163287 100644
--- a/geode-wan/src/integrationTest/java/org/apache/geode/internal/cache/wan/GatewayReceiverXmlParsingValidationsJUnitTest.java
+++ b/geode-wan/src/integrationTest/java/org/apache/geode/internal/cache/wan/GatewayReceiverXmlParsingValidationsJUnitTest.java
@@ -20,13 +20,13 @@ import static org.apache.geode.internal.Assert.assertTrue;
import static org.apache.geode.test.util.ResourceUtils.createTempFileFromResource;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import java.util.Arrays;
import java.util.Collection;
-import java.util.Iterator;
-import java.util.ServiceLoader;
+import java.util.Set;
import org.junit.After;
import org.junit.Rule;
@@ -44,6 +44,8 @@ import org.apache.geode.cache.wan.GatewayReceiverFactory;
import org.apache.geode.cache.wan.GatewayTransportFilter;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.internal.cache.wan.spi.WANFactory;
+import org.apache.geode.services.module.ModuleService;
+import org.apache.geode.services.result.ModuleServiceResult;
import org.apache.geode.test.junit.categories.WanTest;
import org.apache.geode.test.junit.rules.serializable.SerializableTestName;
import org.apache.geode.test.junit.runners.CategoryWithParameterizedRunnerFactory;
@@ -81,14 +83,17 @@ public class GatewayReceiverXmlParsingValidationsJUnitTest {
createTempFileFromResource(getClass(),
getClass().getSimpleName() + "." + testName.getMethodName() + ".cache.xml")
.getAbsolutePath();
- cache = new CacheFactory().set(MCAST_PORT, "0").set(CACHE_XML_FILE, cacheXmlFileName).create();
+ cache = new CacheFactory().setModuleService(ModuleService.DEFAULT).set(MCAST_PORT, "0")
+ .set(CACHE_XML_FILE, cacheXmlFileName).create();
assertThat(cache.getGatewayReceivers()).isNotEmpty();
GatewayReceiver receiver = cache.getGatewayReceivers().iterator().next();
- ServiceLoader<WANFactory> loader = ServiceLoader.load(WANFactory.class);
- Iterator<WANFactory> itr = loader.iterator();
- assertThat(itr.hasNext()).isTrue();
+ ModuleServiceResult<Set<WANFactory>> serviceLoadResult =
+ ModuleService.DEFAULT.loadService(WANFactory.class);
+
+ assertTrue(serviceLoadResult.isSuccessful());
+ assertFalse(serviceLoadResult.getMessage().isEmpty());
assertEquals(1501, receiver.getEndPort());
assertEquals(1500, receiver.getStartPort());
diff --git a/geode-wan/src/upgradeTest/java/org/apache/geode/cache/wan/WANRollingUpgradeMultipleReceiversDefinedInClusterConfiguration.java b/geode-wan/src/upgradeTest/java/org/apache/geode/cache/wan/WANRollingUpgradeMultipleReceiversDefinedInClusterConfiguration.java
index 76a2916..5a9177e 100644
--- a/geode-wan/src/upgradeTest/java/org/apache/geode/cache/wan/WANRollingUpgradeMultipleReceiversDefinedInClusterConfiguration.java
+++ b/geode-wan/src/upgradeTest/java/org/apache/geode/cache/wan/WANRollingUpgradeMultipleReceiversDefinedInClusterConfiguration.java
@@ -181,7 +181,7 @@ public class WANRollingUpgradeMultipleReceiversDefinedInClusterConfiguration
private void addMultipleGatewayReceiverElementsToClusterConfiguration()
throws Exception {
// Create empty xml document
- CacheCreation creation = new CacheCreation();
+ CacheCreation creation = new CacheCreation(ModuleService.DEFAULT);
final StringWriter stringWriter = new StringWriter();
final PrintWriter printWriter = new PrintWriter(stringWriter);
CacheXmlGenerator.generate(creation, printWriter, true, false, false);
diff --git a/geode-web-management/build.gradle b/geode-web-management/build.gradle
index 1c13702..a0c28fd 100644
--- a/geode-web-management/build.gradle
+++ b/geode-web-management/build.gradle
@@ -125,6 +125,7 @@ dependencies {
integrationTestImplementation(sourceSets.commonTest.output)
+ integrationTestImplementation(project(':geode-common-services'))
integrationTestImplementation(project(':geode-core'))
integrationTestImplementation('org.springframework:spring-test')
integrationTestImplementation('org.springframework:spring-webmvc')
diff --git a/geode-web/build.gradle b/geode-web/build.gradle
index 7c28069..0f92582 100644
--- a/geode-web/build.gradle
+++ b/geode-web/build.gradle
@@ -57,6 +57,7 @@ dependencies {
testImplementation(project(':geode-junit'))
testImplementation('org.springframework:spring-test')
+ integrationTestImplementation(project(':geode-common-services'));
integrationTestImplementation(project(':geode-dunit'));
integrationTestRuntimeOnly(files(war.destinationDir))