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(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
_ttestOrderedUpdates()
Tests that distributed updates are delivered in order
|
static void |
assertCacheCallbackEvents(java.lang.String regionName,
com.gemstone.gemfire.cache.TransactionId txId,
java.lang.Object key,
java.lang.Object oldValue,
java.lang.Object newValue) |
static void |
assertNoClearTimeouts() |
static void |
clearCCRegion() |
void |
concurrentMapTest(java.lang.String rName)
Do putIfAbsent(), replace(Object, Object),
replace(Object, Object, Object), remove(Object, Object) operations
|
protected void |
createRegionWithAttribute(VM vm,
java.lang.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 java.util.Map |
getCCRegionContents() |
static java.util.Map<java.lang.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(java.lang.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,
java.lang.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 void tearDown2()
throws java.lang.Exception
DistributedTestCaseDistributedTestCase.tearDown() method, and should be over ridden in its place.tearDown2 in class RegionTestCasejava.lang.Exceptionpublic void testConcurrentOperations()
throws java.lang.Exception
java.lang.Exceptionpublic void concurrentMapTest(java.lang.String rName)
public void testDistributedUpdate()
put in a distributed region
one VM updates the value in another VM.public void _ttestOrderedUpdates()
throws java.lang.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.
java.lang.Throwablepublic void testDistributedGet()
netSearch.public void testDistributedPutNoUpdate()
throws java.lang.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.java.lang.InterruptedExceptionpublic void testDefinedEntryUpdated()
public void testDistributedDestroy()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testDistributedRegionDestroy()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testLocalDestroy()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testLocalRegionDestroy()
throws java.lang.InterruptedException
Region.localDestroyRegion() is not propagated
to other VMs that define that region.java.lang.InterruptedExceptionpublic void testDistributedInvalidate()
public void testDistributedInvalidate4()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testDistributedRegionInvalidate()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testRemoteCacheListener()
throws java.lang.InterruptedException
CacheListener is invoked in a remote VM.java.lang.InterruptedExceptionpublic void testRemoteCacheListenerInSubregion()
throws java.lang.InterruptedException
CacheListener is invoked in a remote VM.java.lang.InterruptedExceptionprotected boolean supportsNetLoad()
public void testRemoteCacheLoader()
throws java.lang.InterruptedException
CacheLoader is invoked in a remote VM. This
essentially tests netLoad.java.lang.InterruptedExceptionpublic void testRemoteCacheLoaderArg()
throws java.lang.InterruptedException
CacheLoader
is actually passed.java.lang.InterruptedExceptionpublic void testRemoteCacheLoaderException()
throws java.lang.InterruptedException
CacheLoader that throws a CacheLoaderException results is propagated back to the caller.java.lang.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 java.lang.InterruptedException
Region.get(java.lang.Object) returns null when
there is no remote loader.java.lang.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 java.lang.InterruptedException
CacheWriter is invoked and that
CacheWriter arguments and CacheWriterExceptions are propagated appropriately.java.lang.InterruptedExceptionpublic void testLocalAndRemoteCacheWriters()
throws java.lang.InterruptedException
CacheWriter
is invoked instead of a remote one.java.lang.InterruptedExceptionpublic void testCacheLoaderModifyingArgument()
throws java.lang.InterruptedException
CacheLoader modifies the callback
argument in place, the change is visible to the
CacheWriter even if it is in another VM.java.lang.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 java.lang.Exception
java.lang.Exceptionprotected boolean supportsReplication()
public void testReplicate()
throws java.lang.InterruptedException
DataPolicy.REPLICATE.java.lang.InterruptedExceptionpublic void testDeltaWithReplicate()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testGetInitialImage()
public void testLargeGetInitialImage()
public void testMirroredDataFromNonMirrored()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testNoMirroredDataToNonMirrored()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testMirroredLocalLoad()
public void testMirroredNetLoad()
netLoad occurs, even with
mirroringpublic void testNoRegionKeepAlive()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testNetSearchObservesTtl()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testNetSearchObservesIdleTime()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testEntryTtlDestroyEvent()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testEntryTtlLocalDestroy()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testUpdateResetsIdleTime()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testNonblockingGetInitialImage()
throws java.lang.Throwable
java.lang.Throwablepublic void DISABLED_TILL_NEW_TX_IMPL_COMPLETE_testTXNonblockingGetInitialImage()
throws java.lang.Throwable
java.lang.Throwablepublic void testNBRegionInvalidationDuringGetInitialImage()
throws java.lang.Throwable
java.lang.Throwablepublic void testNBRegionDestructionDuringGetInitialImage()
throws java.lang.Throwable
java.lang.Throwablepublic void testNoDataSerializer()
DataSerializer.public void testNoInstantiator()
Instantiator.public static void assertCacheCallbackEvents(java.lang.String regionName,
com.gemstone.gemfire.cache.TransactionId txId,
java.lang.Object key,
java.lang.Object oldValue,
java.lang.Object newValue)
public void testTXSimpleOps()
throws java.lang.Exception
java.lang.Exceptionprotected boolean supportsTransactions()
public void testTXUpdateLoadNoConflict()
throws java.lang.Exception
java.lang.Exceptionpublic void testTXMultiRegion()
throws java.lang.Exception
java.lang.Exceptionpublic void testTXRmtMirror()
throws java.lang.Exception
java.lang.Exceptionpublic void todo_testTXAlgebra()
throws java.lang.Exception
java.lang.Exceptionprotected com.gemstone.gemfire.cache.RegionAttributes getRegionAttributes(java.lang.String type)
public void versionTestGIISendsTombstones()
throws java.lang.Exception
java.lang.Exceptionprotected void disconnect(VM vm)
public void versionTestConcurrentEvents()
throws java.lang.Exception
java.lang.Exceptionprotected AsyncInvocation performOps4ClearWithConcurrentEvents(VM vm, int opNum)
protected void createRegionWithAttribute(VM vm, java.lang.String name, boolean syncDiskWrite)
public void versionTestClearWithConcurrentEvents()
throws java.lang.Exception
java.lang.Exceptionpublic void versionTestClearWithConcurrentEventsAsync()
throws java.lang.Exception
java.lang.Exceptionprotected void z_versionTestClearWithConcurrentEvents(boolean syncDiskWrite)
throws java.lang.Exception
java.lang.Exceptionpublic void versionTestClearOnNonReplicateWithConcurrentEvents()
throws java.lang.Exception
java.lang.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 java.lang.Exception
java.lang.Exceptionprotected boolean waitForAsyncProcessing(AsyncInvocation async, java.lang.String expectedError)
public static void assertNoClearTimeouts()
public static void clearCCRegion()
public static java.util.Map getCCRegionContents()
public static byte[] getCCRegionVersionVector()
throws java.lang.Exception
java.lang.Exceptionpublic static java.util.Map<java.lang.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.