public abstract class DistributedCacheTestCase extends DistributedTestCase
DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2| Modifier and Type | Field and Description |
|---|---|
protected static com.gemstone.gemfire.cache.Cache |
cache
The current cache in this VM
|
logPerTest, reconnect, system, testName| Constructor and Description |
|---|
DistributedCacheTestCase(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
forEachVMInvoke(String methodName,
Object[] args)
Assumes there is only one host, and invokes the given method in
every VM that host knows about.
|
protected static com.gemstone.gemfire.distributed.internal.DistributionManager |
getDistributionManager()
Return the distribution manager associate with the cache
|
protected static com.gemstone.gemfire.cache.Region |
getRootRegion()
Returns the root region of the cache.
|
protected static void |
remoteAssertEntryValue(String regionName,
String entryName,
Object expected)
Asserts that the value of an entry in a region is what we expect
it to be.
|
protected static void |
remoteCreateRegion(String name)
Creates a new sub-Region of the root Region in a remote VM with
default scope, SCOPE_LOCAL.
|
protected static void |
remoteCreateRegion(String name,
com.gemstone.gemfire.cache.Scope scope)
Creates a new sub-Region of the root Region in a remote VM.
|
protected static void |
remoteDefineEntry(String regionName,
String entryName,
com.gemstone.gemfire.cache.Scope scope)
Defines an entry in the Region with the given
name and scope.
|
protected static void |
remoteDefineEntry(String regionName,
String entryName,
com.gemstone.gemfire.cache.Scope scope,
boolean doNetSearch)
Defines an entry in the Region with the given name and scope.
|
protected static void |
remoteDestroy(String regionName,
String entryName)
Destroys the value of an entry in a region in a remote VM
|
protected static void |
remoteInvalidate(String regionName,
String entryName)
Invalidates the value of an entry in a region in a remote VM
|
protected static void |
remotePut(String regionName,
String entryName,
Object value,
com.gemstone.gemfire.cache.Scope scope)
Puts (or creates) a value in a subregion of
region
named entryName. |
protected static void |
remotePutDistributed(String regionName,
String entryName,
Object value)
Does a put with the given value, defining a DISTRIBUTED_NO_ACK entry
in the Region with the given name.
|
protected static void |
remoteReplace(String regionName,
String entryName,
Object value)
Replaces the value of an entry in a region in a remote VM
|
void |
setUp()
Sets up the test (noop).
|
protected void |
setUp(boolean createLocalCache)
Creates the
Cache and root region in each remote VM
and, if createLocalCache, in this VM. |
void |
tearDown2()
Closes the cache in this VM and each remote VM
|
addExpectedException, addExpectedException, addHydraProperties, attachDebugger, checkBBFlag, cleanupAllVms, clearBBFlag, crashDistributedSystem, crashDistributedSystem, createLogWriter, disconnectAllFromDS, disconnectFromDS, dumpAllStacks, dumpMyThreads, dumpStack, dumpStack, dumpStack, dumpStackTrace, fail, getAllDistributedSystemProperties, getDistributedSystemProperties, getDUnitLocatorAddress, getDUnitLocatorPort, getDUnitLocatorString, getDUnitLogLevel, getIPLiteral, getLogWriter, getLonerSystem, getMcastSystem, getMcastSystem, getRepeatTimeoutMs, getServerHostName, getSystem, getSystem, getTestClass, getTestName, getUniqueName, getVMCount, incBBFlag, invokeInEveryVM, invokeInEveryVM, invokeInEveryVM, invokeInEveryVM, invokeInEveryVMRepeatingIfNecessary, invokeInLocator, invokeRepeatingIfNecessary, isConnectedToDS, join, noteTiming, pause, pause, perVMSetUp, realTearDown, setDiskStoreForGateway, setSystem, setTestName, staticPause, tearDown, unregisterAllDataSerializersFromAllVms, unregisterDataSerializerInThisVM, unregisterInstantiatorsInThisVM, waitForBBFlag, waitForCriterion, waitMutexassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toStringprotected static com.gemstone.gemfire.cache.Cache cache
public DistributedCacheTestCase(String name)
public void setUp()
throws Exception
DistributedTestCasesetUp in class DistributedTestCaseExceptionprotected void setUp(boolean createLocalCache)
throws Exception
Cache and root region in each remote VM
and, if createLocalCache, in this VM.Exceptionpublic void tearDown2()
throws Exception
tearDown2 in class DistributedTestCaseExceptionprotected static com.gemstone.gemfire.cache.Region getRootRegion()
throws com.gemstone.gemfire.cache.CacheException
Cache and the root region have already been created.com.gemstone.gemfire.cache.CacheExceptionprotected static com.gemstone.gemfire.distributed.internal.DistributionManager getDistributionManager()
protected static void remoteCreateRegion(String name) throws com.gemstone.gemfire.cache.CacheException
name - The name of the newly-created sub-Region. It is
recommended that the name of the Region be the DistributedTestCase.getUniqueName() of the test.com.gemstone.gemfire.cache.CacheExceptionprotected static void remoteCreateRegion(String name, com.gemstone.gemfire.cache.Scope scope) throws com.gemstone.gemfire.cache.CacheException
name - The name of the newly-created sub-Region. It is
recommended that the name of the Region be the DistributedTestCase.getUniqueName() of the test.scope - create the region attributes with this scopecom.gemstone.gemfire.cache.CacheExceptionprotected static void remoteDefineEntry(String regionName, String entryName, com.gemstone.gemfire.cache.Scope scope) throws com.gemstone.gemfire.cache.CacheException
regionName - The name of a region that is a sub-region of the root
region, or a global nameentryName - Must be Serializablecom.gemstone.gemfire.cache.CacheExceptionprotected static void remoteDefineEntry(String regionName, String entryName, com.gemstone.gemfire.cache.Scope scope, boolean doNetSearch) throws com.gemstone.gemfire.cache.CacheException
entryName
(with the appropriate attributes) that contains an entry named
entryName.regionName - The name of a region that is a sub-region of the root
region, or a global nameentryName - Must be SerializabledoNetSearch - Will the distributed region perform a netSearch when
looking for objects? If false a CacheException will be thrown if an entry in the region
is asked for and it not there.com.gemstone.gemfire.cache.CacheExceptionprotected static void remotePut(String regionName, String entryName, Object value, com.gemstone.gemfire.cache.Scope scope) throws com.gemstone.gemfire.cache.CacheException
region
named entryName.com.gemstone.gemfire.cache.CacheExceptionprotected static void remotePutDistributed(String regionName, String entryName, Object value) throws com.gemstone.gemfire.cache.CacheException
regionName - The name of a region that is a sub-region of the root
region, or a global nameentryName - Must be Serializablecom.gemstone.gemfire.cache.CacheExceptionprotected static void remoteReplace(String regionName, String entryName, Object value) throws com.gemstone.gemfire.cache.CacheException
regionName - The name of a region that is a sub-region of the root
regionentryName - Must be Serializablevalue - The value used to replacecom.gemstone.gemfire.cache.CacheExceptionRegion#put()protected static void remoteInvalidate(String regionName, String entryName) throws com.gemstone.gemfire.cache.CacheException
regionName - The name of a region that is a sub-region of the root
regionentryName - Must be Serializablecom.gemstone.gemfire.cache.CacheExceptionRegion#replace()protected static void remoteDestroy(String regionName, String entryName) throws com.gemstone.gemfire.cache.CacheException
regionName - The name of a region that is a sub-region of the root
regionentryName - Must be Serializablecom.gemstone.gemfire.cache.CacheExceptionRegion#replace()protected static void remoteAssertEntryValue(String regionName, String entryName, Object expected) throws com.gemstone.gemfire.cache.CacheException
regionName - The name of a region that is a sub-region of the root
regionentryName - Must be Serializablecom.gemstone.gemfire.cache.CacheExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.