public class ConnectionPoolDUnitTest extends CacheTestCase
| Modifier and Type | Class and Description |
|---|---|
protected class |
ConnectionPoolDUnitTest.BridgeLoaderTestNonSerializable |
static class |
ConnectionPoolDUnitTest.BridgeServerCacheLoader
Create a bridgeserver that has a value for every key queried and a unique
key/value in the specified Region that uniquely identifies each instance.
|
protected class |
ConnectionPoolDUnitTest.ConnectionPoolDUnitTestSerializable2 |
protected class |
ConnectionPoolDUnitTest.ControlListener |
static class |
ConnectionPoolDUnitTest.DelayListener
Test that the "notify by subscription" attribute is unique for each BridgeServer and Gateway
|
DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2| Modifier and Type | Field and Description |
|---|---|
protected static int |
baselineLifetimeCheck |
protected static int |
baselineLifetimeConnect |
protected static int |
baselineLifetimeDisconnect |
protected static int |
baselineLifetimeExtensions |
protected static int |
numberOfAfterCreates |
protected static int |
numberOfAfterInvalidates |
protected static int |
numberOfAfterUpdates |
protected static int |
port |
protected static int |
port2 |
protected static boolean |
stopTestLifetimeExpire |
protected static int |
TYPE_CREATE |
protected static int |
TYPE_DESTROY |
protected static int |
TYPE_INVALIDATE |
protected static int |
TYPE_UPDATE |
cachelogPerTest, reconnect, system, testName| Constructor and Description |
|---|
ConnectionPoolDUnitTest(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
balanced(com.gemstone.gemfire.cache.client.internal.PoolImpl pool,
int expectedConsPerServer) |
protected void |
createBridgeServer(int port)
Create a bridge server on the given port without starting it.
|
void |
createBridgeServer(VM vm,
String rName,
int port,
boolean notifyBySubscription) |
protected com.gemstone.gemfire.cache.Cache |
createDynamicRegionCache(String testName,
com.gemstone.gemfire.cache.util.BridgeWriter w)
Creates a "loner" distributed system that has dynamic region creation
enabled.
|
protected com.gemstone.gemfire.cache.Cache |
createDynamicRegionCache(String testName,
String connectionPoolName)
Creates a "loner" distributed system that has dynamic region creation
enabled.
|
protected static com.gemstone.gemfire.cache.EntryEvent |
createFakeyEntryEvent(com.gemstone.gemfire.cache.Region r)
Create a fake EntryEvent that returns the provided region for
CacheEvent.getRegion()
and returns Operation.LOCAL_LOAD_CREATE for CacheEvent.getOperation() |
protected com.gemstone.gemfire.distributed.internal.InternalDistributedSystem |
createLonerDS() |
com.gemstone.gemfire.cache.AttributesFactory |
getBridgeServerMirroredAckRegionAttributes(com.gemstone.gemfire.cache.CacheLoader cl,
com.gemstone.gemfire.cache.CacheWriter cw) |
com.gemstone.gemfire.cache.AttributesFactory |
getBridgeServerMirroredRegionAttributes(com.gemstone.gemfire.cache.CacheLoader cl,
com.gemstone.gemfire.cache.CacheWriter cw) |
com.gemstone.gemfire.cache.AttributesFactory |
getBridgeServerRegionAttributes(com.gemstone.gemfire.cache.CacheLoader cl,
com.gemstone.gemfire.cache.CacheWriter cw) |
protected static int |
getCacheServerPort()
Accessed by reflection DO NOT REMOVE
|
protected int |
getMaxThreads()
By default return 0 which turns off selector and gives thread per cnx.
|
protected static long |
getNumberOfAfterCreates() |
protected static long |
getNumberOfAfterInvalidates() |
protected static long |
getNumberOfAfterUpdates() |
protected static com.gemstone.gemfire.cache.client.internal.PoolImpl |
getPool(com.gemstone.gemfire.cache.Region r) |
protected com.gemstone.gemfire.cache.RegionAttributes |
getRegionAttributes()
Returns region attributes for a
LOCAL region |
protected static TestCacheWriter |
getTestWriter(com.gemstone.gemfire.cache.Region r) |
protected String |
outOfBalanceReport(com.gemstone.gemfire.cache.client.internal.PoolImpl pool) |
void |
setUp()
Sets up the test (noop).
|
protected void |
startBridgeServer(int port)
Starts a bridge server on the given port, using the given
deserializeValues and notifyBySubscription to serve up the
given region.
|
protected void |
startBridgeServer(int port,
int socketBufferSize) |
protected void |
startBridgeServer(int port,
int socketBufferSize,
long loadPollInterval) |
void |
tearDown2()
Tears down the test.
|
void |
testBridgeLoader() |
void |
testBridgeLoaderFailover() |
void |
testBridgeServerFailoverCnx0()
Test BridgeServer failover with connectionsPerServer set to 0
|
void |
testBridgeServerFailoverCnx1()
Tests the BridgeServer failover (bug 31832).
|
void |
testBridgeWriter()
Tests the basic operations of the
BridgeWriter |
void |
testBridgeWriterCreate()
Tests the create operation of the
BridgeWriter |
void |
testBridgeWriterPut()
Tests the put operation of the
BridgeWriter |
void |
testBridgeWriterPutNoDeserialize()
Tests the put operation of the
BridgeWriter |
void |
testBug36684()
Tests for bug 36684 by having two bridge servers with cacheloaders that should always return
a value and one client connected to each server reading values.
|
void |
testBug39526part1()
Make sure a tx done in a server on an empty region gets sent
to clients who have registered interest.
|
void |
testBug39526part2()
Now confirm that a tx done in a peer of a server (the server having
an empty region and wanting all events) sends the tx to its clients
|
void |
testCallbackArg()
Tests that the callback argument is sent to the server
|
void |
testCallbackArg2()
Tests that consecutive puts have the callback assigned
appropriately.
|
void |
testClientGetOfInvalidServerEntry() |
void |
testClientRegisterUnregisterRequests() |
void |
testContainsKeyOnServer()
Tests the containsKeyOnServer operation of the
BridgeWriter |
void |
testCreateNullValue()
Tests that invoking
Region.create(K, V) with a
null value does the right thing with the BridgeWriter. |
void |
testDestroy()
Tests that a
Region.localDestroy(java.lang.Object) is not propagated to the
server and that a Region.destroy(java.lang.Object) is. |
void |
testDPEmptyCCInterestListRegistrationWithCallbackArg()
Tests interest list registration with callback arg with DataPolicy.EMPTY
and InterestPolicy.CACHE_CONTENT
|
void |
testDPEmptyInterestListRegistrationWithCallbackArg()
Tests interest list registration with callback arg with DataPolicy.EMPTY
and InterestPolicy.ALL
|
void |
testDynamicRegionCreation()
Test dynamic region creation instantiated from a bridge client
causing regions to be created on two different bridge servers.
|
void |
testEmptyByteArray()
Test for bug 36279
|
void |
testForCacheLoaderException()
Test for client connection loss with CacheLoader Exception on the server.
|
void |
testInterestKeyRegistration()
Tests interest key registration.
|
void |
testInterestListRegistration()
Tests interest list registration.
|
void |
testInterestListRegistrationWithCallbackArg()
Tests interest list registration with callback arg
|
void |
testInvalidateAndDestroyPropagation()
Tests that invalidates and destroys are propagated to
BridgeWriters. |
void |
testInvalidateAndDestroyToEmptyAllPropagation()
Tests that invalidates and destroys are propagated to
BridgeWriters
correctly to DataPolicy.EMPTY + InterestPolicy.ALL |
void |
testInvalidateAndDestroyToEmptyCCPropagation()
Tests that invalidates and destroys are propagated to
BridgeWriters
correctly to DataPolicy.EMPTY + InterestPolicy.CACHE_CONTENT |
void |
testKeySetOnServer()
Tests the keySetOnServer operation of the
BridgeWriter |
void |
testLifetimeExpireOnPoolCnx()
Make sure cnx lifetime expiration working on thread local cnxs.
|
void |
testLifetimeExpireOnTL()
Make sure cnx lifetime expiration working on thread local cnxs.
|
void |
testNotifyAllUpdates()
Tests 'notify-all' client updates.
|
void |
testNotSerializableException()
Tests that creating, putting and getting a non-serializable key or value
throws the correct (NotSerializableException) exception.
|
void |
testOnlyRequestedUpdates()
Tests that updates are not sent to VMs that did not ask for
them.
|
void |
todo_testDestroyRegion()
Tests that a
Region.localDestroyRegion() is not propagated
to the server and that a Region.destroyRegion() is. |
protected void |
validateDS() |
void |
verifyBalanced(com.gemstone.gemfire.cache.client.internal.PoolImpl pool,
int expectedServer,
int expectedConsPerServer) |
void |
verifyServerCount(com.gemstone.gemfire.cache.client.internal.PoolImpl pool,
int expectedCount) |
void |
waitForBlacklistToClear(com.gemstone.gemfire.cache.client.internal.PoolImpl pool) |
static void |
waitForEntry(com.gemstone.gemfire.cache.Region r,
Object key)
A handy method to poll for arrival of non-null/non-invalid entries
|
static com.gemstone.gemfire.cache.Region |
waitForSubRegion(com.gemstone.gemfire.cache.Region r,
String subRegName) |
addExceptionTag1, 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, 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 int port
protected static int port2
protected static int numberOfAfterInvalidates
protected static int numberOfAfterCreates
protected static int numberOfAfterUpdates
protected static final int TYPE_CREATE
protected static final int TYPE_UPDATE
protected static final int TYPE_INVALIDATE
protected static final int TYPE_DESTROY
protected static volatile boolean stopTestLifetimeExpire
protected static volatile int baselineLifetimeCheck
protected static volatile int baselineLifetimeExtensions
protected static volatile int baselineLifetimeConnect
protected static volatile int baselineLifetimeDisconnect
public ConnectionPoolDUnitTest(String name)
public void setUp()
throws Exception
DistributedTestCasesetUp in class DistributedTestCaseExceptionpublic void tearDown2()
throws Exception
DistributedTestCaseDistributedTestCase.tearDown() method, and should be over ridden in its place.tearDown2 in class CacheTestCaseExceptionprotected static com.gemstone.gemfire.cache.client.internal.PoolImpl getPool(com.gemstone.gemfire.cache.Region r)
protected static TestCacheWriter getTestWriter(com.gemstone.gemfire.cache.Region r)
protected void createBridgeServer(int port)
throws IOException
IOExceptionprotected void startBridgeServer(int port)
throws IOException
IOExceptionprotected void startBridgeServer(int port,
int socketBufferSize)
throws IOException
IOExceptionprotected void startBridgeServer(int port,
int socketBufferSize,
long loadPollInterval)
throws IOException
IOExceptionprotected int getMaxThreads()
protected com.gemstone.gemfire.distributed.internal.InternalDistributedSystem createLonerDS()
protected com.gemstone.gemfire.cache.RegionAttributes getRegionAttributes()
LOCAL regionprotected static com.gemstone.gemfire.cache.EntryEvent createFakeyEntryEvent(com.gemstone.gemfire.cache.Region r)
CacheEvent.getRegion()
and returns Operation.LOCAL_LOAD_CREATE for CacheEvent.getOperation()r - public void testBridgeLoaderFailover()
throws com.gemstone.gemfire.cache.CacheException,
InterruptedException,
Throwable
com.gemstone.gemfire.cache.CacheExceptionInterruptedExceptionThrowablepublic void verifyBalanced(com.gemstone.gemfire.cache.client.internal.PoolImpl pool,
int expectedServer,
int expectedConsPerServer)
protected boolean balanced(com.gemstone.gemfire.cache.client.internal.PoolImpl pool,
int expectedConsPerServer)
protected String outOfBalanceReport(com.gemstone.gemfire.cache.client.internal.PoolImpl pool)
public void waitForBlacklistToClear(com.gemstone.gemfire.cache.client.internal.PoolImpl pool)
public void verifyServerCount(com.gemstone.gemfire.cache.client.internal.PoolImpl pool,
int expectedCount)
public void testCallbackArg()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testCallbackArg2()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testBug36684()
throws com.gemstone.gemfire.cache.CacheException,
InterruptedException
InterruptedExceptioncom.gemstone.gemfire.cache.CacheExceptionpublic void testForCacheLoaderException()
throws com.gemstone.gemfire.cache.CacheException,
InterruptedException
com.gemstone.gemfire.cache.CacheExceptionInterruptedExceptionpublic void testBridgeLoader()
throws com.gemstone.gemfire.cache.CacheException,
InterruptedException,
Throwable
com.gemstone.gemfire.cache.CacheExceptionInterruptedExceptionThrowableprotected void validateDS()
public void testBridgeWriter()
throws com.gemstone.gemfire.cache.CacheException
BridgeWritercom.gemstone.gemfire.cache.CacheExceptionpublic void testBridgeServerFailoverCnx1()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testBridgeServerFailoverCnx0()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testLifetimeExpireOnTL()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testLifetimeExpireOnPoolCnx()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testBridgeWriterCreate()
throws com.gemstone.gemfire.cache.CacheException
BridgeWritercom.gemstone.gemfire.cache.CacheExceptionpublic void testBridgeWriterPut()
throws com.gemstone.gemfire.cache.CacheException
BridgeWritercom.gemstone.gemfire.cache.CacheExceptionpublic void testBridgeWriterPutNoDeserialize()
throws com.gemstone.gemfire.cache.CacheException
BridgeWritercom.gemstone.gemfire.cache.CacheExceptionpublic void testInvalidateAndDestroyPropagation()
throws com.gemstone.gemfire.cache.CacheException
BridgeWriters.com.gemstone.gemfire.cache.CacheExceptionpublic void testInvalidateAndDestroyToEmptyAllPropagation()
throws com.gemstone.gemfire.cache.CacheException
BridgeWriters
correctly to DataPolicy.EMPTY + InterestPolicy.ALLcom.gemstone.gemfire.cache.CacheExceptionpublic void testInvalidateAndDestroyToEmptyCCPropagation()
throws com.gemstone.gemfire.cache.CacheException
BridgeWriters
correctly to DataPolicy.EMPTY + InterestPolicy.CACHE_CONTENTcom.gemstone.gemfire.cache.CacheExceptionpublic com.gemstone.gemfire.cache.AttributesFactory getBridgeServerRegionAttributes(com.gemstone.gemfire.cache.CacheLoader cl,
com.gemstone.gemfire.cache.CacheWriter cw)
public com.gemstone.gemfire.cache.AttributesFactory getBridgeServerMirroredRegionAttributes(com.gemstone.gemfire.cache.CacheLoader cl,
com.gemstone.gemfire.cache.CacheWriter cw)
public com.gemstone.gemfire.cache.AttributesFactory getBridgeServerMirroredAckRegionAttributes(com.gemstone.gemfire.cache.CacheLoader cl,
com.gemstone.gemfire.cache.CacheWriter cw)
public void testOnlyRequestedUpdates()
throws Exception
Exceptionpublic void testInterestKeyRegistration()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testInterestListRegistration()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionprotected static int getCacheServerPort()
protected static long getNumberOfAfterCreates()
protected static long getNumberOfAfterUpdates()
protected static long getNumberOfAfterInvalidates()
protected com.gemstone.gemfire.cache.Cache createDynamicRegionCache(String testName, com.gemstone.gemfire.cache.util.BridgeWriter w)
protected com.gemstone.gemfire.cache.Cache createDynamicRegionCache(String testName, String connectionPoolName)
public static void waitForEntry(com.gemstone.gemfire.cache.Region r,
Object key)
r - the Region to pollkey - the key of the Entry to poll forpublic static com.gemstone.gemfire.cache.Region waitForSubRegion(com.gemstone.gemfire.cache.Region r,
String subRegName)
public void createBridgeServer(VM vm, String rName, int port, boolean notifyBySubscription)
public void testClientGetOfInvalidServerEntry()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testClientRegisterUnregisterRequests()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testContainsKeyOnServer()
throws com.gemstone.gemfire.cache.CacheException
BridgeWritercom.gemstone.gemfire.cache.CacheExceptionpublic void testCreateNullValue()
throws com.gemstone.gemfire.cache.CacheException
Region.create(K, V) with a
null value does the right thing with the BridgeWriter.com.gemstone.gemfire.cache.CacheExceptionpublic void testDestroy()
throws com.gemstone.gemfire.cache.CacheException
Region.localDestroy(java.lang.Object) is not propagated to the
server and that a Region.destroy(java.lang.Object) is. Also makes sure
that callback arguments are passed correctly.com.gemstone.gemfire.cache.CacheExceptionpublic void todo_testDestroyRegion()
throws com.gemstone.gemfire.cache.CacheException
Region.localDestroyRegion() is not propagated
to the server and that a Region.destroyRegion() is. Also
makes sure that callback arguments are passed correctly.com.gemstone.gemfire.cache.CacheExceptionpublic void testDPEmptyInterestListRegistrationWithCallbackArg()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testDPEmptyCCInterestListRegistrationWithCallbackArg()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testDynamicRegionCreation()
throws Exception
Exceptionpublic void testEmptyByteArray()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testInterestListRegistrationWithCallbackArg()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testKeySetOnServer()
throws com.gemstone.gemfire.cache.CacheException
BridgeWritercom.gemstone.gemfire.cache.CacheExceptionpublic void testNotSerializableException()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testNotifyAllUpdates()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testBug39526part1()
throws com.gemstone.gemfire.cache.CacheException,
InterruptedException
com.gemstone.gemfire.cache.CacheExceptionInterruptedExceptionpublic void testBug39526part2()
throws com.gemstone.gemfire.cache.CacheException,
InterruptedException
com.gemstone.gemfire.cache.CacheExceptionInterruptedExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.