public class CqQueryUsingPoolDUnitTest extends CacheTestCase
DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2| Modifier and Type | Field and Description |
|---|---|
java.lang.String[] |
cqs |
static java.lang.String |
KEY |
static long |
MAX_TIME |
static int |
noTest |
protected static int |
port |
protected static int |
port2 |
java.lang.String[] |
regions |
cachelogPerTest, reconnect, system, testName| Constructor and Description |
|---|
CqQueryUsingPoolDUnitTest(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCQListenerEvents(VM vm,
java.lang.String cqName) |
void |
closeClient(VM client) |
void |
closeCQ(VM vm,
java.lang.String cqName) |
void |
closeServer(VM server) |
void |
createAndExecCQNoName(VM vm,
java.lang.String poolName,
java.lang.String queryStr) |
void |
createClient(VM client,
int[] serverPorts,
java.lang.String serverHost,
java.lang.String redundancyLevel,
java.lang.String poolName) |
void |
createClient(VM client,
int serverPort,
java.lang.String serverHost) |
void |
createCQ(VM vm,
java.lang.String cqName,
java.lang.String queryStr) |
void |
createCQ(VM vm,
java.lang.String poolName,
java.lang.String cqName,
java.lang.String queryStr) |
void |
createFunctionalIndex(VM vm,
java.lang.String indexName,
java.lang.String indexedExpression,
java.lang.String fromClause) |
void |
createPool(VM vm,
java.lang.String poolName,
java.lang.String[] servers,
int[] ports) |
void |
createPool(VM vm,
java.lang.String poolName,
java.lang.String[] servers,
int[] ports,
java.lang.String redundancyLevel) |
void |
createPool(VM vm,
java.lang.String poolName,
java.lang.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,
java.lang.String regionName,
int size) |
void |
createValuesWithTime(VM vm,
java.lang.String regionName,
int size) |
void |
deleteValues(VM vm,
java.lang.String regionName,
int size) |
void |
executeCQ(VM vm,
java.lang.String cqName,
boolean initialResults,
int expectedResultsSize,
java.lang.String[] expectedKeys,
java.lang.String expectedErr)
Execute/register CQ as running.
|
void |
executeCQ(VM vm,
java.lang.String cqName,
boolean initialResults,
java.lang.String expectedErr) |
protected com.gemstone.gemfire.cache.RegionAttributes |
getRegionAttributes()
Returns region attributes for a
LOCAL region |
void |
invalidateValues(VM vm,
java.lang.String regionName,
int size)
support for invalidating values.
|
void |
registerInterestListCQ(VM vm,
java.lang.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,
java.lang.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,
java.lang.String cqName,
int resultSize,
int creates,
int updates,
int deletes) |
void |
validateCQ(VM vm,
java.lang.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,
java.lang.String query,
int resultSize) |
void |
waitForClose(VM vm,
java.lang.String cqName) |
void |
waitForCqState(VM vm,
java.lang.String cqName,
int state)
Waits till the CQ state is same as the expected.
|
void |
waitForCreated(VM vm,
java.lang.String cqName,
java.lang.String key) |
void |
waitForDestroyed(VM vm,
java.lang.String cqName,
java.lang.String key) |
void |
waitForInvalidated(VM vm,
java.lang.String cqName,
java.lang.String key) |
void |
waitForRegionClear(VM vm,
java.lang.String cqName) |
void |
waitForRegionInvalidate(VM vm,
java.lang.String cqName) |
void |
waitForUpdated(VM vm,
java.lang.String cqName,
java.lang.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 java.lang.String[] regions
public static final java.lang.String KEY
public static final long MAX_TIME
public final java.lang.String[] cqs
public CqQueryUsingPoolDUnitTest(java.lang.String name)
public void setUp()
throws java.lang.Exception
DistributedTestCasesetUp in class DistributedTestCasejava.lang.Exceptionpublic 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 serverPort, java.lang.String serverHost)
public void createClient(VM client, int[] serverPorts, java.lang.String serverHost, java.lang.String redundancyLevel, java.lang.String poolName)
public void closeClient(VM client)
public void createFunctionalIndex(VM vm, java.lang.String indexName, java.lang.String indexedExpression, java.lang.String fromClause)
public void createValues(VM vm, java.lang.String regionName, int size)
public void createValuesWithTime(VM vm, java.lang.String regionName, int size)
public void deleteValues(VM vm, java.lang.String regionName, int size)
public void invalidateValues(VM vm, java.lang.String regionName, int size)
public void createPool(VM vm, java.lang.String poolName, java.lang.String server, int port)
public void createPool(VM vm, java.lang.String poolName, java.lang.String[] servers, int[] ports)
public void createPool(VM vm, java.lang.String poolName, java.lang.String[] servers, int[] ports, java.lang.String redundancyLevel)
public void createCQ(VM vm, java.lang.String poolName, java.lang.String cqName, java.lang.String queryStr)
public void createCQ(VM vm, java.lang.String cqName, java.lang.String queryStr)
public void createAndExecCQNoName(VM vm, java.lang.String poolName, java.lang.String queryStr)
public void executeCQ(VM vm, java.lang.String cqName, boolean initialResults, java.lang.String expectedErr)
public void executeCQ(VM vm, java.lang.String cqName, boolean initialResults, int expectedResultsSize, java.lang.String[] expectedKeys, java.lang.String expectedErr)
initialResults - true if initialResults are requestedexpectedResultsSize - if >= 0, validate results against this sizeexpectedErr - if not null, an error we expectpublic void stopCQ(VM vm, java.lang.String cqName) throws java.lang.Exception
java.lang.Exceptionpublic void closeCQ(VM vm, java.lang.String cqName) throws java.lang.Exception
java.lang.Exceptionpublic void registerInterestListCQ(VM vm, java.lang.String regionName, int keySize, boolean all)
public void validateCQCount(VM vm, int cqCnt) throws java.lang.Exception
java.lang.Exceptionpublic void validateCQ(VM vm, java.lang.String cqName, int resultSize, int creates, int updates, int deletes)
public void validateCQ(VM vm, java.lang.String cqName, int resultSize, int creates, int updates, int deletes, int queryInserts, int queryUpdates, int queryDeletes, int totalEvents)
public void waitForCreated(VM vm, java.lang.String cqName, java.lang.String key)
public void waitForUpdated(VM vm, java.lang.String cqName, java.lang.String key)
public void waitForDestroyed(VM vm, java.lang.String cqName, java.lang.String key)
public void waitForInvalidated(VM vm, java.lang.String cqName, java.lang.String key)
public void waitForClose(VM vm, java.lang.String cqName)
public void waitForRegionClear(VM vm, java.lang.String cqName)
public void waitForRegionInvalidate(VM vm, java.lang.String cqName)
public void waitForCqState(VM vm, java.lang.String cqName, int state)
public void clearCQListenerEvents(VM vm, java.lang.String cqName)
public void validateQuery(VM vm, java.lang.String query, int resultSize)
public void testInterestListAndCQs()
throws java.lang.Exception
java.lang.Exceptionpublic void testCQStopExecute()
throws java.lang.Exception
java.lang.Exceptionpublic void testCQAttributesMutator()
throws java.lang.Exception
java.lang.Exceptionpublic void testCQCreateClose()
throws java.lang.Exception
java.lang.Exceptionpublic void testRegionDestroy()
throws java.lang.Exception
java.lang.Exceptionpublic void testCQWithMultipleClients()
throws java.lang.Exception
java.lang.Exceptionpublic void testCQResultSet()
throws java.lang.Exception
java.lang.Exceptionpublic void testCQEvents()
throws java.lang.Exception
java.lang.Exceptionpublic void testCqEventsWithoutAlias()
throws java.lang.Exception
java.lang.Exceptionpublic void testEnableDisableCQ()
throws java.lang.Exception
java.lang.Exceptionpublic void testQuery()
throws java.lang.Exception
java.lang.Exceptionpublic void testCQFailOver()
throws java.lang.Exception
java.lang.Exceptionpublic void testCQHA()
throws java.lang.Exception
java.lang.Exceptionpublic void testFilterRegistrationDuringGII()
throws java.lang.Exception
java.lang.Exceptionpublic void testWithoutCQs()
throws java.lang.Exception
java.lang.Exceptionpublic void testGetCQsForARegionName()
throws java.lang.Exception
java.lang.Exceptionpublic void testQueryWithNULLInWhereClause()
throws java.lang.Exception
java.lang.Exceptionpublic void testForSupportedRegionAttributes()
throws java.lang.Exception
java.lang.Exceptionpublic void startBridgeServer(int port)
throws java.io.IOException
java.io.IOExceptionpublic void startBridgeServer(int port,
boolean notifyBySubscription)
throws java.io.IOException
java.io.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.