public abstract class MultiVMRegionTestCase extends RegionTestCase
Region tests that involve more than
one VM.| Modifier and Type | Class and Description |
|---|---|
class |
MultiVMRegionTestCase.MyTransactionListener |
RegionTestCase.TestExpiryDistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2| Modifier and Type | Field and Description |
|---|---|
static com.gemstone.gemfire.internal.cache.LocalRegion |
CCRegion |
eventCount, preSnapshotRegioncachelogPerTest, reconnect, system, testName| Constructor and Description |
|---|
MultiVMRegionTestCase(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
_ttestOrderedUpdates()
Tests that distributed updates are delivered in order
|
static void |
assertCacheCallbackEvents(String regionName,
com.gemstone.gemfire.cache.TransactionId txId,
Object key,
Object oldValue,
Object newValue) |
static void |
assertNoClearTimeouts() |
static void |
clearCCRegion() |
void |
concurrentMapTest(String rName)
Do putIfAbsent(), replace(Object, Object),
replace(Object, Object, Object), remove(Object, Object) operations
|
protected void |
createRegionWithAttribute(VM vm,
String name,
boolean syncDiskWrite) |
void |
DISABLED_TILL_NEW_TX_IMPL_COMPLETE_testTXNonblockingGetInitialImage()
Tests that distributed ack operations do not block while
another cache is doing a getInitialImage.
|
protected void |
disconnect(VM vm) |
static void |
doOpsLoopNoFlush(int runTimeMs,
boolean includeClear,
boolean includePutAll) |
static Map |
getCCRegionContents() |
static Map<String,com.gemstone.gemfire.internal.cache.versions.VersionTag> |
getCCRegionVersions()
returns a map of keys->versiontags for the test region
|
static byte[] |
getCCRegionVersionVector()
Since version vectors aren't java.io.Serializable we use DataSerializer
to return a serialized form of the vector
|
static com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember |
getMemberId() |
protected com.gemstone.gemfire.cache.RegionAttributes |
getRegionAttributes(String type)
return the region attributes for the given type of region.
|
protected AsyncInvocation |
performOps4ClearWithConcurrentEvents(VM vm,
int opNum) |
protected boolean |
supportsNetLoad()
Indicate whether this region supports netload
|
protected boolean |
supportsReplication()
Indicate whether replication/GII supported
|
protected boolean |
supportsTransactions()
Indicate whether this region supports transactions
|
void |
tearDown2()
Tears down the test.
|
void |
testCacheLoaderModifyingArgument()
Tests that when a
CacheLoader modifies the callback
argument in place, the change is visible to the
CacheWriter even if it is in another VM. |
void |
testCacheLoaderWithNetLoad() |
void |
testCacheLoaderWithNetSearch() |
void |
testConcurrentOperations()
This is a for the ConcurrentMap operations.
|
void |
testDefinedEntryUpdated()
Two VMs create a region.
|
void |
testDeltaWithReplicate()
Tests that a Delta is applied correctly both locally and on a replicate
region.
|
void |
testDistributedDestroy()
Tests that destroying an entry is
propagated to all VMs that define that entry.
|
void |
testDistributedGet()
Tests that doing a distributed get results in a
netSearch. |
void |
testDistributedInvalidate()
Tests that invalidating an entry is
propagated to all VMs that define that entry.
|
void |
testDistributedInvalidate4()
Tests that invalidating an entry
in multiple VMs does not cause any problems.
|
void |
testDistributedPut()
Tests that an entry update is propagated to other caches that
have that same entry defined.
|
void |
testDistributedPutNoUpdate()
Tests that doing a
put on a distributed region
in one VM does not effect a region in a different VM that does
not have that key defined. |
void |
testDistributedRegionDestroy()
Tests that destroying a region is
propagated to all VMs that define that region.
|
void |
testDistributedRegionInvalidate()
Tests that invalidating a
region is propagated to all VMs that define that entry.
|
void |
testDistributedUpdate()
Tests that doing a
put in a distributed region
one VM updates the value in another VM. |
void |
testEntryTtlDestroyEvent()
Tests that an entry in a distributed region that expires with a distributed
destroy causes an event in other VM with isExpiration flag set.
|
void |
testEntryTtlLocalDestroy()
Tests that an entry in a distributed region expires with a local
destroy after a given time to live.
|
void |
testGetInitialImage()
Tests that a newly-created mirrored region contains all of the
entries of another region.
|
void |
testLargeGetInitialImage()
Tests that a newly-created mirrored region contains all of the
entries of another region, with a large quantity of data.
|
void |
testLocalAndRemoteCacheWriters()
Tests that, when given a choice, a local
CacheWriter
is invoked instead of a remote one. |
void |
testLocalCacheLoader()
Tests that a local loader is preferred to a remote one
|
void |
testLocalDestroy()
Tests that a Region.localDestroy(java.lang.Object) does not effect
other VMs that define that entry.
|
void |
testLocalRegionDestroy()
Tests that a
Region.localDestroyRegion() is not propagated
to other VMs that define that region. |
void |
testMirroredDataFromNonMirrored()
Tests that a mirrored region gets data pushed to it from a
non-mirrored region and the afterCreate event is invoked on a listener.
|
void |
testMirroredLocalLoad()
Tests that a local load occurs, even with mirroring
|
void |
testMirroredNetLoad()
Tests sure that a
netLoad occurs, even with
mirroring |
void |
testNBRegionDestructionDuringGetInitialImage() |
void |
testNBRegionInvalidationDuringGetInitialImage() |
void |
testNetSearchObservesIdleTime() |
void |
testNetSearchObservesTtl() |
void |
testNoDataSerializer()
Tests what happens when one VM attempts to read an object for
which it does not have a registered
DataSerializer. |
void |
testNoInstantiator()
Tests what happens when one VM attempts to read an object for
which it does not have a registered
Instantiator. |
void |
testNoLoaderWithInvalidEntry()
Tests that a remote
CacheLoader is not invoked if
the remote region has an invalid entry (that is, a key, but no
value). |
void |
testNoMirroredDataToNonMirrored()
Tests that a mirrored region does not push data to a non-mirrored
region.
|
void |
testNonblockingGetInitialImage()
Tests that distributed ack operations do not block while
another cache is doing a getInitialImage.
|
void |
testNoRegionKeepAlive()
Tests that a region is not kept alive
|
void |
testNoRemoteCacheLoader()
Tests that
Region.get(java.lang.Object) returns null when
there is no remote loader. |
void |
testRemoteCacheListener()
Tests that a
CacheListener is invoked in a remote VM. |
void |
testRemoteCacheListenerInSubregion()
Tests that a
CacheListener is invoked in a remote VM. |
void |
testRemoteCacheLoader()
Tests that a
CacheLoader is invoked in a remote VM. |
void |
testRemoteCacheLoaderArg()
Tests that the parameter passed to a remote
CacheLoader
is actually passed. |
void |
testRemoteCacheLoaderException()
Tests that a remote
CacheLoader that throws a CacheLoaderException results is propagated back to the caller. |
void |
testRemoteCacheWriter()
Tests that a remote
CacheWriter is invoked and that
CacheWriter arguments and CacheWriterExceptions are propagated appropriately. |
void |
testRemoteLoaderNetSearch()
Tests that invoking
netSearch in a remote loader
returns null instead of causing infinite recursion. |
void |
testReplicate()
Tests that keys and values are pushed with
DataPolicy.REPLICATE. |
void |
testTXMultiRegion() |
void |
testTXRmtMirror() |
void |
testTXSimpleOps()
Tests that an entry update is propagated to other caches that
have that same entry defined.
|
void |
testTXUpdateLoadNoConflict()
Tests that the push of a loaded value does not cause a conflict
on the side receiving the update
|
void |
testUpdateResetsIdleTime()
Tests to makes sure that a distributed update resets the
expiration timer.
|
void |
todo_testTXAlgebra() |
void |
versionTestClearOnNonReplicateWithConcurrentEvents() |
void |
versionTestClearWithConcurrentEvents() |
void |
versionTestClearWithConcurrentEventsAsync() |
void |
versionTestConcurrentEvents()
This tests the concurrency versioning system to ensure that event conflation
happens correctly and that the statistic is being updated properly
|
void |
versionTestConcurrentEventsOnEmptyRegion()
This tests the concurrency versioning system to ensure that event conflation
happens correctly and that the statistic is being updated properly
|
void |
versionTestConcurrentEventsOnNonReplicatedRegion()
This tests the concurrency versioning system to ensure that event conflation
happens correctly and that the statistic is being updated properly
|
void |
versionTestGetAllWithVersions() |
void |
versionTestGIISendsTombstones() |
void |
versionTestRegionVersionVectors() |
void |
versionTestTombstones() |
protected boolean |
waitForAsyncProcessing(AsyncInvocation async,
String expectedError) |
protected void |
z_versionTestClearWithConcurrentEvents(boolean syncDiskWrite) |
createRegion, createRootRegion, entryIsLocal, getRegionAttributes, pauseIfNecessary, pauseIfNecessary, remoteTestPostSnapshot, supportsLocalDestroyAndLocalInvalidate, supportsSubregions, testBadRegionAccess, testCloseRegion, testContainsKey, testCreateSubregions, testCustomEntryIdleReset, testCustomEntryIdleTimeout1, testCustomEntryIdleTimeout2, testCustomEntryIdleTimeout3, testCustomEntryTtl1, testCustomEntryTtl2, testCustomEntryTtl3, testCustomIdleOnce, testDestroyEntry, testDestroyRegion, testEntries, testEntriesRecursive, testEntryExpirationAfterMutate, testEntryFromLoadTtlInvalidate, testEntryIdleDestroy, testEntryIdleInvalidate, testEntryIdleReset, testEntryIdleTimeout3, testEntryIdleTtl, testEntryTtl3, testEntryTtlDestroy, testEntryTtlInvalidate, testEntryUserAttribute, testGetCache, testGetName, testGetParentRegion, testGetPathFromRoot, testInvalidateEntry, testInvalidateRegion, testKeys, testLocalDestroyEntry, testLocalDestroyRegion, testLocalInvalidateEntry, testLocalInvalidateRegion, testNulls, testPutNonExistentEntry, testRegionExpirationAfterMutate, testRegionIdleDestroy, testRegionIdleInvalidate, testRegionTtlDestroy, testRegionTtlInvalidate, testRegionUserAttribute, testRootSnapshot, testSnapshot, testSubregions, testSubregionsRecursive, testValues, waitForDestroy, waitForInvalidate, waitForRegionDestroyaddExceptionTag1, basicGetCache, beginCacheXml, cleanDiskDirs, closeAllCache, closeCache, createLonerCache, createMcastCache, createMcastCache, createRegion, createRegion, createRootRegion, createRootRegion, disconnectFromDS, finishCacheXml, finishCacheXml, getCache, getCache, getCache, getCache, getClientCache, getDiskDirs, getGemfireCache, getInternalRegionArguments, getRootRegion, getRootRegion, hasCache, remoteTearDown, removeExceptionTag1, sendSerialMessageToAll, sendUnorderedMessageToAlladdExpectedException, addExpectedException, addHydraProperties, attachDebugger, checkBBFlag, cleanupAllVms, clearBBFlag, crashDistributedSystem, crashDistributedSystem, createLogWriter, disconnectAllFromDS, 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, setUp, 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, toStringpublic MultiVMRegionTestCase(String name)
public void tearDown2()
throws Exception
DistributedTestCaseDistributedTestCase.tearDown() method, and should be over ridden in its place.tearDown2 in class RegionTestCaseExceptionpublic void testConcurrentOperations()
throws Exception
Exceptionpublic void concurrentMapTest(String rName)
public void testDistributedUpdate()
put in a distributed region
one VM updates the value in another VM.public void _ttestOrderedUpdates()
throws Throwable
Note that this test does not make sense for regions that are
Scope.DISTRIBUTED_NO_ACK for which we do not guarantee
the ordering of updates for a single producer/single consumer.
DISABLED 4-16-04 - the current implementation assumes events
are processed synchronously, which is no longer true.
Throwablepublic void testDistributedGet()
netSearch.public void testDistributedPutNoUpdate()
throws InterruptedException
put on a distributed region
in one VM does not effect a region in a different VM that does
not have that key defined.InterruptedExceptionpublic void testDefinedEntryUpdated()
public void testDistributedDestroy()
throws InterruptedException
InterruptedExceptionpublic void testDistributedRegionDestroy()
throws InterruptedException
InterruptedExceptionpublic void testLocalDestroy()
throws InterruptedException
InterruptedExceptionpublic void testLocalRegionDestroy()
throws InterruptedException
Region.localDestroyRegion() is not propagated
to other VMs that define that region.InterruptedExceptionpublic void testDistributedInvalidate()
public void testDistributedInvalidate4()
throws InterruptedException
InterruptedExceptionpublic void testDistributedRegionInvalidate()
throws InterruptedException
InterruptedExceptionpublic void testRemoteCacheListener()
throws InterruptedException
CacheListener is invoked in a remote VM.InterruptedExceptionpublic void testRemoteCacheListenerInSubregion()
throws InterruptedException
CacheListener is invoked in a remote VM.InterruptedExceptionprotected boolean supportsNetLoad()
public void testRemoteCacheLoader()
throws InterruptedException
CacheLoader is invoked in a remote VM. This
essentially tests netLoad.InterruptedExceptionpublic void testRemoteCacheLoaderArg()
throws InterruptedException
CacheLoader
is actually passed.InterruptedExceptionpublic void testRemoteCacheLoaderException()
throws InterruptedException
CacheLoader that throws a CacheLoaderException results is propagated back to the caller.InterruptedExceptionpublic void testCacheLoaderWithNetSearch()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testCacheLoaderWithNetLoad()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testNoRemoteCacheLoader()
throws InterruptedException
Region.get(java.lang.Object) returns null when
there is no remote loader.InterruptedExceptionpublic void testNoLoaderWithInvalidEntry()
CacheLoader is not invoked if
the remote region has an invalid entry (that is, a key, but no
value).public void testRemoteCacheWriter()
throws InterruptedException
CacheWriter is invoked and that
CacheWriter arguments and CacheWriterExceptions are propagated appropriately.InterruptedExceptionpublic void testLocalAndRemoteCacheWriters()
throws InterruptedException
CacheWriter
is invoked instead of a remote one.InterruptedExceptionpublic void testCacheLoaderModifyingArgument()
throws InterruptedException
CacheLoader modifies the callback
argument in place, the change is visible to the
CacheWriter even if it is in another VM.InterruptedExceptionpublic void testRemoteLoaderNetSearch()
throws com.gemstone.gemfire.cache.CacheException
netSearch in a remote loader
returns null instead of causing infinite recursion.com.gemstone.gemfire.cache.CacheExceptionpublic void testLocalCacheLoader()
public void testDistributedPut()
throws Exception
Exceptionprotected boolean supportsReplication()
public void testReplicate()
throws InterruptedException
DataPolicy.REPLICATE.InterruptedExceptionpublic void testDeltaWithReplicate()
throws InterruptedException
InterruptedExceptionpublic void testGetInitialImage()
public void testLargeGetInitialImage()
public void testMirroredDataFromNonMirrored()
throws InterruptedException
InterruptedExceptionpublic void testNoMirroredDataToNonMirrored()
throws InterruptedException
InterruptedExceptionpublic void testMirroredLocalLoad()
public void testMirroredNetLoad()
netLoad occurs, even with
mirroringpublic void testNoRegionKeepAlive()
throws InterruptedException
InterruptedExceptionpublic void testNetSearchObservesTtl()
throws InterruptedException
InterruptedExceptionpublic void testNetSearchObservesIdleTime()
throws InterruptedException
InterruptedExceptionpublic void testEntryTtlDestroyEvent()
throws InterruptedException
InterruptedExceptionpublic void testEntryTtlLocalDestroy()
throws InterruptedException
InterruptedExceptionpublic void testUpdateResetsIdleTime()
throws InterruptedException
InterruptedExceptionpublic void testNonblockingGetInitialImage()
throws Throwable
Throwablepublic void DISABLED_TILL_NEW_TX_IMPL_COMPLETE_testTXNonblockingGetInitialImage()
throws Throwable
Throwablepublic void testNBRegionInvalidationDuringGetInitialImage()
throws Throwable
Throwablepublic void testNBRegionDestructionDuringGetInitialImage()
throws Throwable
Throwablepublic void testNoDataSerializer()
DataSerializer.public void testNoInstantiator()
Instantiator.public static void assertCacheCallbackEvents(String regionName, com.gemstone.gemfire.cache.TransactionId txId, Object key, Object oldValue, Object newValue)
public void testTXSimpleOps()
throws Exception
Exceptionprotected boolean supportsTransactions()
public void testTXUpdateLoadNoConflict()
throws Exception
Exceptionprotected com.gemstone.gemfire.cache.RegionAttributes getRegionAttributes(String type)
public void versionTestGIISendsTombstones()
throws Exception
Exceptionprotected void disconnect(VM vm)
public void versionTestConcurrentEvents()
throws Exception
Exceptionprotected AsyncInvocation performOps4ClearWithConcurrentEvents(VM vm, int opNum)
protected void createRegionWithAttribute(VM vm, String name, boolean syncDiskWrite)
public void versionTestClearWithConcurrentEvents()
throws Exception
Exceptionpublic void versionTestClearWithConcurrentEventsAsync()
throws Exception
Exceptionprotected void z_versionTestClearWithConcurrentEvents(boolean syncDiskWrite)
throws Exception
Exceptionpublic void versionTestClearOnNonReplicateWithConcurrentEvents()
throws Exception
Exceptionpublic void versionTestTombstones()
public void versionTestConcurrentEventsOnEmptyRegion()
public static void doOpsLoopNoFlush(int runTimeMs,
boolean includeClear,
boolean includePutAll)
public void versionTestConcurrentEventsOnNonReplicatedRegion()
public void versionTestGetAllWithVersions()
public void versionTestRegionVersionVectors()
throws Exception
Exceptionprotected boolean waitForAsyncProcessing(AsyncInvocation async, String expectedError)
public static void assertNoClearTimeouts()
public static void clearCCRegion()
public static Map getCCRegionContents()
public static byte[] getCCRegionVersionVector()
throws Exception
Exceptionpublic static Map<String,com.gemstone.gemfire.internal.cache.versions.VersionTag> getCCRegionVersions()
public static com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember getMemberId()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.