public class HARQueueNewImplDUnitTest extends DistributedTestCase
DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2| Modifier and Type | Field and Description |
|---|---|
protected static com.gemstone.gemfire.cache.Cache |
cache |
protected static VM |
clientVM1 |
protected static VM |
clientVM2 |
protected static com.gemstone.gemfire.LogWriter |
logger |
protected static int |
numOfCreates |
protected static int |
numOfInvalidates |
protected static int |
numOfUpdates |
protected static VM |
serverVM0 |
logPerTest, reconnect, system, testName| Constructor and Description |
|---|
HARQueueNewImplDUnitTest(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
_testMemoryFootprintOfHARegionQueuesWithAndWithoutOverflow()
This test verifies that the memory foorprint of the ha region queues is
less when ha-overflow is enabled (with an appropriate value of haCapacity)
compared to when it is disabled, for the same amount of data feed.
|
static void |
closeCache() |
static void |
createClientCache(String host,
Integer port1,
Integer port2,
String rLevel) |
static void |
createClientCache(String host,
Integer port1,
Integer port2,
String rLevel,
Boolean addListener) |
static void |
createEntries() |
static void |
createEntries(Long num) |
static Integer |
createOneMoreBridgeServer(Boolean notifyBySubscription) |
static Integer |
createServerCache() |
static Integer |
createServerCache(String ePolicy) |
static Integer |
createServerCache(String ePolicy,
Integer cap) |
static void |
haQueuePut() |
static void |
makeValuesOfSomeKeysNullInClientMsgsRegion(Integer port,
String[] keys) |
static void |
populateValuesOfSomeKeysInClientMsgsRegion(Integer port,
String[] keys) |
static void |
printMsg(String msg) |
static void |
putEntries() |
static void |
putHeavyEntries(Integer num) |
static void |
registerInterestList() |
static void |
registerInterestListAll() |
void |
setUp()
Sets up the test.
|
static void |
startServer() |
static void |
stopServer() |
void |
tearDown2()
Tears down the test.
|
void |
testClientMsgsRegionSize()
This test verifies that the client-messages-region does not store duplicate
ClientUpdateMessageImpl instances, during a normal put path as well as the
GII path.
|
void |
testCMRCreatedForMemOrEntryEvictionPolicy()
This test verifies that client-messages-regions are created for the bridge
servers who have eviction policy either as 'mem' or as 'entry'.
|
void |
testCMRNotCreatedForNoneEvictionPolicy()
This test verifies that client-messages-regions are not created for the
bridge servers who have eviction policy as 'none'.
|
void |
testCMRNotReturnedByRootRegionsMethod()
This test verifies that the Cache.rootRegions() method does not return the
client-messages-region of any of the cache's attached bridge servers.
|
void |
testConcurrentGIIAndDispatch()
Addresses the bug 39179.
|
void |
testHAEventWrapperDoesNotHoldCUMOnceInsideCMR()
This test verifies that the HAEventWrapper instances present in the
client-messages-region give up the references to their respective
ClientUpdateMessageImpl instances.
|
void |
testRefCountForDestroy()
This test verifies that the destruction of a ha-region (caused by
proxy/client disconnect), causes the reference count of all HAEventWrapper
instances belonging to the ha-region-queue to be decremented by one, and
makes it visible to the client-messages-region.
|
void |
testRefCountForNormalAndGIIPut()
This test verifies that the ha-region-queues increment the reference count
of their respective HAEventWrapper instances in the client-messages-region
correctly, during put as well as GII path.
|
void |
testRefCountForPeekAndRemove()
This test verifies that the ha-region-queues decrement the reference count
of their respective HAEventWrapper instances in the client-messages-region
correctly, after the events have been peeked and removed from the queue.
|
void |
testRefCountForQRM()
This test verifies that the processing of the QRM messages results in
decrementing the reference count of corresponding HAEventWrapper instances,
correctly.
|
void |
testTwoBridgeServersInOneVMDoShareCMR()
This test verifies that when two BridgeServerImpl instances are created in
a single VM, they do share the client-messages-region.
|
void |
testUpdatesWithTwoBridgeServersInOneVM()
This test verifies that two clients, connected to two bridge servers with
different notifyBySubscription values, on a single VM, receive
updates/invalidates depending upon their notifyBySubscription value.
|
static void |
updateMap1() |
static void |
updateMap2() |
static void |
updateMapForVM0() |
static void |
updateMapForVM1() |
static void |
verifyHaContainerType(Boolean isRegion,
Integer port) |
static void |
verifyNullValuesInCMR(Integer numOfEntries,
Integer port,
String[] keys) |
static void |
verifyQueueData(Integer regionsize,
Integer msgsRegionsize,
Integer port) |
static void |
verifyRegionSize(Integer regionSize,
Integer msgsRegionsize) |
static void |
verifyRegionSize(Integer regionSize,
Integer msgsRegionsize,
Integer port) |
static void |
verifyRootRegionsDoesNotReturnCMR(Integer port) |
static void |
verifyUpdatesReceived(Integer num,
Boolean isUpdate,
Long waitLimit) |
static void |
waitTillMessagesAreDispatched(Integer port,
Long waitLimit) |
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
protected static VM serverVM0
protected static VM clientVM1
protected static VM clientVM2
protected static com.gemstone.gemfire.LogWriter logger
protected static int numOfCreates
protected static int numOfUpdates
protected static int numOfInvalidates
public HARQueueNewImplDUnitTest(String name)
name - name of the testpublic void setUp()
throws Exception
setUp in class DistributedTestCaseExceptionpublic void tearDown2()
throws Exception
tearDown2 in class DistributedTestCaseExceptionpublic static Integer createServerCache(String ePolicy) throws Exception
Exceptionpublic static Integer createServerCache(String ePolicy, Integer cap) throws Exception
Exceptionpublic static Integer createOneMoreBridgeServer(Boolean notifyBySubscription) throws Exception
Exceptionpublic static void createClientCache(String host, Integer port1, Integer port2, String rLevel, Boolean addListener) throws Exception
Exceptionpublic static void createClientCache(String host, Integer port1, Integer port2, String rLevel) throws Exception
Exceptionpublic static void registerInterestListAll()
public static void registerInterestList()
public static void putEntries()
public static void createEntries()
public static void createEntries(Long num)
public static void putHeavyEntries(Integer num)
public void testClientMsgsRegionSize()
throws Exception
Exceptionpublic void testRefCountForNormalAndGIIPut()
throws Exception
Exceptionpublic void testRefCountForPeekAndRemove()
throws Exception
Exceptionpublic void testRefCountForQRM()
throws Exception
Exceptionpublic void testRefCountForDestroy()
throws Exception
Exceptionpublic void testConcurrentGIIAndDispatch()
throws Exception
Exceptionpublic void testTwoBridgeServersInOneVMDoShareCMR()
throws Exception
Exceptionpublic void testUpdatesWithTwoBridgeServersInOneVM()
throws Exception
Exceptionpublic void testHAEventWrapperDoesNotHoldCUMOnceInsideCMR()
throws Exception
Exceptionpublic void testCMRNotCreatedForNoneEvictionPolicy()
throws Exception
Exceptionpublic void testCMRCreatedForMemOrEntryEvictionPolicy()
throws Exception
Exceptionpublic void testCMRNotReturnedByRootRegionsMethod()
throws Exception
Exceptionpublic void _testMemoryFootprintOfHARegionQueuesWithAndWithoutOverflow()
throws Exception
Exceptionpublic static void stopServer()
public static void updateMapForVM0()
public static void updateMap1()
public static void updateMap2()
public static void updateMapForVM1()
public static void printMsg(String msg)
public static void haQueuePut()
public static void verifyNullValuesInCMR(Integer numOfEntries, Integer port, String[] keys)
public static void makeValuesOfSomeKeysNullInClientMsgsRegion(Integer port, String[] keys)
public static void populateValuesOfSomeKeysInClientMsgsRegion(Integer port, String[] keys)
public static void startServer()
public static void verifyQueueData(Integer regionsize, Integer msgsRegionsize, Integer port)
public static void verifyRegionSize(Integer regionSize, Integer msgsRegionsize, Integer port)
public static void verifyRootRegionsDoesNotReturnCMR(Integer port)
public static void verifyUpdatesReceived(Integer num, Boolean isUpdate, Long waitLimit)
public static void waitTillMessagesAreDispatched(Integer port, Long waitLimit)
public static void closeCache()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.