public class HARegionQueueDUnitTest extends DistributedTestCase
DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2| Modifier and Type | Field and Description |
|---|---|
protected static com.gemstone.gemfire.cache.Cache |
cache |
protected static Thread |
createQueuesThread |
protected static com.gemstone.gemfire.internal.cache.ha.HARegionQueue |
hrq |
protected static Thread[] |
opThreads |
protected static boolean |
toCnt |
logPerTest, reconnect, system, testName| Constructor and Description |
|---|
HARegionQueueDUnitTest(String name)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
_testBugNo35988()
Behaviour of take() has been changed for relaible messaging feature.
|
static void |
clearRegion() |
static void |
closeCache()
close the cache
|
protected com.gemstone.gemfire.cache.Cache |
createCache()
create cache
|
static void |
createHARegionQueueandCheckExpiration()
Checks the data received by GII, only gets expired after proper
construction of HARegionQueue object.
|
static void |
createRegion()
create a client with 2 regions sharing a common writer
|
static void |
createRegionQueue() |
static void |
createRegionQueue2() |
static void |
createRegionQueueandCheckDuplicates()
HARegionQueue should not allow data with duplicate EventIds.
|
static void |
destroy()
destroy key-1
|
static void |
getNull()
do a get on region1
|
static void |
getValue1()
do a get on region1
|
static void |
getValue2()
do a get on region1
|
static void |
putConflatables() |
static void |
putValue1()
do puts on key-1
|
static void |
putValue2()
do puts on key-1,value-2
|
void |
setUp()
get the VM's
|
void |
tearDown2()
close the cache in tearDown
|
void |
testBugNo35989()
This is to test the bug which is caused when HARegionQueue object hasnot
been fully constructed but as the HARegion has got constructed , it gets
visible to expiry thread task causing NullPointerException in some
situations.
|
void |
testConcurrentOperationsDunitTestOnBlockingQueue()
Tests the Blokcing HARegionQueue by doing concurrent put /remove / take /
peek , batch peek operations in multiple regions.
|
void |
testConcurrentOperationsDunitTestOnNonBlockingQueue()
Tests the Non Blocking HARegionQueue by doing concurrent put /remove / take /
peek , batch peek operations in multiple regions.
|
void |
testConcurrentOperationsDunitTestOnNonBlockingQueueWithDNoAckRegion()
Tests the Non Blocking HARegionQueue by doing concurrent put /remove / take /
peek , batch peek operations in multiple regions.
|
void |
testForDuplicateEvents() |
void |
testGII()
1) Create mirrored HARegion region1 in VM1 2) do a put in VM1 3) get teh
value in VM1 to assert put has happened successfully 4) Create mirrored
HARegion region1 in VM2 5) do a get in VM2 to verify that value was got
through GII 6) do a put in VM2 7) assert put in VM2 was successful
|
void |
testGIIAndMapUpdates()
Tests the relevant data structures are updated after GII happens.
|
void |
testLocalDestroy()
1) Create mirrored HARegion region1 in VM1 and VM2 2) do a put in VM1 3)
assert that the put has not propagated from VM1 to VM2 4) do a put in VM2
5) assert that the value in VM1 has not changed to due to put in VM2 6)
assert respective puts the VMs were successful by doing a get 7)
localDestroy key in VM1 8) assert key has been destroyed in VM1 9) assert
key has not been destroyed in VM2
|
void |
testLocalPut()
1) Create mirrored HARegion region1 in VM1 and VM2 2) do a put in VM1 3)
assert that the put has not propagated from VM1 to VM2 4) do a put in VM2
5) assert that the value in VM1 has not changed to due to put in VM2 6)
assert put in VM2 was successful by doing a get
|
void |
testNPEDueToHARegionQueueEscapeInConstructor()
This is to test the bug which is caused when HARegionQueue object hasnot
been fully constructed but as the HARegion has got constructed , it gets
visible to QRM Message Thread.
|
void |
testQRM()
1) Create mirrored HARegion region1 in VM1 2) do a put in VM1 3) get teh
value in VM1 to assert put has happened successfully 4) Create mirrored
HARegion region1 in VM2 5) do a get in VM2 to verify that value was got
through GII 6) do a put in VM2 7) assert put in VM2 was successful
|
static void |
verifyAddingDispatchMesgs() |
static void |
verifyDispatchedMessagesRemoved() |
static void |
verifyMapsAndData()
verifies the data has been populated correctly after GII
|
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 com.gemstone.gemfire.internal.cache.ha.HARegionQueue hrq
protected static volatile boolean toCnt
protected static Thread[] opThreads
protected static volatile Thread createQueuesThread
public HARegionQueueDUnitTest(String name)
public void setUp()
throws Exception
setUp in class DistributedTestCaseExceptionpublic void tearDown2()
throws Exception
tearDown2 in class DistributedTestCaseExceptionprotected com.gemstone.gemfire.cache.Cache createCache()
throws com.gemstone.gemfire.cache.CacheException
Exceptioncom.gemstone.gemfire.cache.CacheExceptionpublic void testLocalPut()
public void testLocalDestroy()
public void testGII()
public void testGIIAndMapUpdates()
public void testQRM()
public void _testBugNo35988()
throws Exception
Exceptionpublic static void createRegion()
throws Exception
Exceptionpublic static void clearRegion()
public static void verifyAddingDispatchMesgs()
public static void verifyDispatchedMessagesRemoved()
public static void closeCache()
public static void putValue1()
public static void putConflatables()
public static void verifyMapsAndData()
public static void putValue2()
public static void getValue1()
public static void getNull()
public static void getValue2()
public static void destroy()
public void testConcurrentOperationsDunitTestOnNonBlockingQueue()
public void testConcurrentOperationsDunitTestOnNonBlockingQueueWithDNoAckRegion()
public void testConcurrentOperationsDunitTestOnBlockingQueue()
public void testNPEDueToHARegionQueueEscapeInConstructor()
public void testBugNo35989()
public static void createHARegionQueueandCheckExpiration()
throws Exception
Exceptionpublic void testForDuplicateEvents()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.