public class CqQueryUsingPoolDUnitTest extends CacheTestCase
DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2| Modifier and Type | Field and Description |
|---|---|
String[] |
cqs |
static String |
KEY |
static long |
MAX_TIME |
static int |
noTest |
protected static int |
port |
protected static int |
port2 |
String[] |
regions |
cachelogPerTest, reconnect, system, testName| Constructor and Description |
|---|
CqQueryUsingPoolDUnitTest(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCQListenerEvents(VM vm,
String cqName) |
void |
closeClient(VM client) |
void |
closeCQ(VM vm,
String cqName) |
void |
closeServer(VM server) |
void |
createAndExecCQNoName(VM vm,
String poolName,
String queryStr) |
void |
createClient(VM client,
int[] serverPorts,
String serverHost,
String redundancyLevel,
String poolName) |
void |
createClient(VM client,
int serverPort,
String serverHost) |
void |
createCQ(VM vm,
String cqName,
String queryStr) |
void |
createCQ(VM vm,
String poolName,
String cqName,
String queryStr) |
void |
createFunctionalIndex(VM vm,
String indexName,
String indexedExpression,
String fromClause) |
void |
createPool(VM vm,
String poolName,
String[] servers,
int[] ports) |
void |
createPool(VM vm,
String poolName,
String[] servers,
int[] ports,
String redundancyLevel) |
void |
createPool(VM vm,
String poolName,
String server,
int port) |
void |
createServer(VM server) |
void |
createServer(VM server,
int p) |
void |
createServer(VM server,
int thePort,
boolean eviction) |
void |
createServer(VM server,
int thePort,
boolean eviction,
com.gemstone.gemfire.cache.MirrorType mirrorType) |
void |
createServerWithPR(VM server,
int port,
boolean isAccessor,
int redundantCopies)
Create a bridge server with partitioned region.
|
void |
createValues(VM vm,
String regionName,
int size) |
void |
createValuesWithTime(VM vm,
String regionName,
int size) |
void |
deleteValues(VM vm,
String regionName,
int size) |
void |
executeCQ(VM vm,
String cqName,
boolean initialResults,
int expectedResultsSize,
String[] expectedKeys,
String expectedErr)
Execute/register CQ as running.
|
void |
executeCQ(VM vm,
String cqName,
boolean initialResults,
String expectedErr) |
protected com.gemstone.gemfire.cache.RegionAttributes |
getRegionAttributes()
Returns region attributes for a
LOCAL region |
void |
invalidateValues(VM vm,
String regionName,
int size)
support for invalidating values.
|
void |
registerInterestListCQ(VM vm,
String regionName,
int keySize,
boolean all) |
void |
setUp()
Sets up the test (noop).
|
void |
startBridgeServer(int port)
Starts a bridge server on the given port to serve up the given
region.
|
void |
startBridgeServer(int port,
boolean notifyBySubscription)
Starts a bridge server on the given port, using the given
deserializeValues and notifyBySubscription to serve up the
given region.
|
protected void |
stopBridgeServer(com.gemstone.gemfire.cache.Cache cache)
Stops the bridge server that serves up the given cache.
|
void |
stopCQ(VM vm,
String cqName) |
void |
testCQAttributesMutator()
Test for CQ Attributes Mutator functions
|
void |
testCQCreateClose()
Test for CQ register and UnRegister.
|
void |
testCQEvents()
Test for CQ Listener events.
|
void |
testCqEventsWithoutAlias()
Test query execution multiple times on server without ALIAS.
|
void |
testCQFailOver()
Test for CQ Fail over.
|
void |
testCQHA()
Test for CQ Fail over/HA with redundancy level set.
|
void |
testCQResultSet()
Test for CQ ResultSet.
|
void |
testCQStopExecute()
Test for CQ register and UnRegister.
|
void |
testCQWithMultipleClients()
Test for CQ with multiple clients.
|
void |
testEnableDisableCQ()
Test for stopping and restarting CQs.
|
void |
testFilterRegistrationDuringGII()
Test Filter registration during GII.
|
void |
testForSupportedRegionAttributes()
Tests execution of queries with NULL in where clause like where ID = NULL
etc.
|
void |
testGetCQsForARegionName()
Test getCQs for a regions
|
void |
testInterestListAndCQs()
Test for InterestList and CQ registered from same clients.
|
void |
testQuery()
Test for Complex queries.
|
void |
testQueryWithNULLInWhereClause()
Tests execution of queries with NULL in where clause like where ID = NULL
etc.
|
void |
testRegionDestroy()
This will test the events after region destory.
|
void |
testWithoutCQs()
Test without CQs.
|
void |
validateCQ(VM vm,
String cqName,
int resultSize,
int creates,
int updates,
int deletes) |
void |
validateCQ(VM vm,
String cqName,
int resultSize,
int creates,
int updates,
int deletes,
int queryInserts,
int queryUpdates,
int queryDeletes,
int totalEvents) |
void |
validateCQCount(VM vm,
int cqCnt) |
void |
validateQuery(VM vm,
String query,
int resultSize) |
void |
waitForClose(VM vm,
String cqName) |
void |
waitForCqState(VM vm,
String cqName,
int state)
Waits till the CQ state is same as the expected.
|
void |
waitForCreated(VM vm,
String cqName,
String key) |
void |
waitForDestroyed(VM vm,
String cqName,
String key) |
void |
waitForInvalidated(VM vm,
String cqName,
String key) |
void |
waitForRegionClear(VM vm,
String cqName) |
void |
waitForRegionInvalidate(VM vm,
String cqName) |
void |
waitForUpdated(VM vm,
String cqName,
String key) |
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, sendUnorderedMessageToAll, tearDown2addExpectedException, 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
public static int noTest
public final String[] regions
public static final String KEY
public static final long MAX_TIME
public final String[] cqs
public CqQueryUsingPoolDUnitTest(String name)
public void setUp()
throws Exception
DistributedTestCasesetUp in class DistributedTestCaseExceptionpublic void createServer(VM server)
public void createServer(VM server, int p)
public void createServer(VM server, int thePort, boolean eviction)
public void createServer(VM server, int thePort, boolean eviction, com.gemstone.gemfire.cache.MirrorType mirrorType)
public void createServerWithPR(VM server, int port, boolean isAccessor, int redundantCopies)
server - VM where to create the bridge server.port - bridge server port.isAccessor - if true the under lying partitioned region will not host data on this vm.redundantCopies - number of redundant copies for the primary bucket.public void closeServer(VM server)
public void createClient(VM client, int[] serverPorts, String serverHost, String redundancyLevel, String poolName)
public void closeClient(VM client)
public void createFunctionalIndex(VM vm, String indexName, String indexedExpression, String fromClause)
public void invalidateValues(VM vm, String regionName, int size)
public void createPool(VM vm, String poolName, String[] servers, int[] ports, String redundancyLevel)
public void executeCQ(VM vm, String cqName, boolean initialResults, int expectedResultsSize, String[] expectedKeys, String expectedErr)
initialResults - true if initialResults are requestedexpectedResultsSize - if >= 0, validate results against this sizeexpectedErr - if not null, an error we expectpublic void registerInterestListCQ(VM vm, String regionName, int keySize, boolean all)
public void validateCQ(VM vm, String cqName, int resultSize, int creates, int updates, int deletes)
public void validateCQ(VM vm, String cqName, int resultSize, int creates, int updates, int deletes, int queryInserts, int queryUpdates, int queryDeletes, int totalEvents)
public void waitForCqState(VM vm, String cqName, int state)
public void testInterestListAndCQs()
throws Exception
Exceptionpublic void testCQStopExecute()
throws Exception
Exceptionpublic void testCQAttributesMutator()
throws Exception
Exceptionpublic void testCQCreateClose()
throws Exception
Exceptionpublic void testRegionDestroy()
throws Exception
Exceptionpublic void testCQWithMultipleClients()
throws Exception
Exceptionpublic void testCQResultSet()
throws Exception
Exceptionpublic void testCQEvents()
throws Exception
Exceptionpublic void testCqEventsWithoutAlias()
throws Exception
Exceptionpublic void testEnableDisableCQ()
throws Exception
Exceptionpublic void testCQFailOver()
throws Exception
Exceptionpublic void testCQHA()
throws Exception
Exceptionpublic void testFilterRegistrationDuringGII()
throws Exception
Exceptionpublic void testWithoutCQs()
throws Exception
Exceptionpublic void testGetCQsForARegionName()
throws Exception
Exceptionpublic void testQueryWithNULLInWhereClause()
throws Exception
Exceptionpublic void testForSupportedRegionAttributes()
throws Exception
Exceptionpublic void startBridgeServer(int port)
throws IOException
IOExceptionpublic void startBridgeServer(int port,
boolean notifyBySubscription)
throws IOException
IOExceptionprotected void stopBridgeServer(com.gemstone.gemfire.cache.Cache cache)
protected com.gemstone.gemfire.cache.RegionAttributes getRegionAttributes()
LOCAL regionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.