public class CqQueryDUnitTest 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 |
|---|
CqQueryDUnitTest(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 |
closeCrashServer(VM server) |
void |
closeServer(VM server) |
void |
crashServer(VM server) |
void |
createAndExecCQNoName(VM vm,
java.lang.String queryStr) |
void |
createClient(VM client,
int[] serverPorts,
java.lang.String serverHost,
java.lang.String redundancyLevel) |
void |
createClient(VM client,
int serverPort,
java.lang.String serverHost) |
void |
createClientWith2Pools(VM client,
int[] serverPorts1,
int[] serverPorts2,
java.lang.String serverHost,
java.lang.String redundancyLevel) |
void |
createCQ(VM vm,
java.lang.String cqName,
java.lang.String queryStr) |
void |
createCQ(VM vm,
java.lang.String cqName,
java.lang.String queryStr,
boolean isBridgeMemberTest) |
void |
createIndex(VM vm,
java.lang.String indexName,
java.lang.String indexedExpression,
java.lang.String regionPath) |
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 |
createValues(VM vm,
java.lang.String regionName,
int size) |
void |
createValuesAsPortfolios(VM vm,
java.lang.String regionName,
int size) |
void |
createValuesAsPrimitives(VM vm,
java.lang.String regionName,
int size) |
void |
createValuesWithShort(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 |
executeAndCloseAndExecuteIRMultipleTimes(VM vm,
java.lang.String cqName,
java.lang.String queryStr) |
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 |
restartBridgeServer(VM server,
int port) |
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 |
testCQAllServersCrash() |
void |
testCQAllServersLeave() |
void |
testCQAllServersLeaveAndRejoin() |
void |
testCQAllServersLeaveMultiplePool() |
void |
testCQAttributesMutator()
Test for CQ Attributes Mutator functions
|
void |
testCqCloseAndExecuteWithInitialResults() |
void |
testCQCreateClose()
Test for CQ register and UnRegister.
|
void |
testCQEquals() |
void |
testCQEqualsWithIndex() |
void |
testCQEvents()
Test for CQ Listener events.
|
void |
testCQFailOver()
Test for CQ Fail over.
|
void |
testCQHA()
Test for CQ Fail over/HA with redundancy level set.
|
void |
testCQPrimaryLeaves() |
void |
testCQRemainsWhenServerGCs()
bug #47494 - CQs were destroyed when a server did a tombstone GC
|
void |
testCQResultSet()
Test for CQ ResultSet.
|
void |
testCQStopExecute()
Test for CQ register and UnRegister.
|
void |
testCQWhereCondOnShort() |
void |
testCQWithMultipleClients()
Test for CQ with multiple clients.
|
void |
testEnableDisableCQ()
Test for stopping and restarting CQs.
|
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 |
updateValuesAsPrimitives(VM vm,
java.lang.String regionName,
int size) |
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 |
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 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 closeServer(VM server)
public void crashServer(VM server)
public void closeCrashServer(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)
public void createClientWith2Pools(VM client, int[] serverPorts1, int[] serverPorts2, java.lang.String serverHost, java.lang.String redundancyLevel)
public void closeClient(VM client)
public void createValues(VM vm, java.lang.String regionName, int size)
public void createValuesWithTime(VM vm, java.lang.String regionName, int size)
public void createValuesWithShort(VM vm, java.lang.String regionName, int size)
public void createValuesAsPrimitives(VM vm, java.lang.String regionName, int size)
public void updateValuesAsPrimitives(VM vm, java.lang.String regionName, int size)
public void createValuesAsPortfolios(VM vm, java.lang.String regionName, int size)
public void createIndex(VM vm, java.lang.String indexName, java.lang.String indexedExpression, java.lang.String regionPath)
public void deleteValues(VM vm, java.lang.String regionName, int size)
public void invalidateValues(VM vm, java.lang.String regionName, int size)
public void createCQ(VM vm, java.lang.String cqName, java.lang.String queryStr)
public void createCQ(VM vm, java.lang.String cqName, java.lang.String queryStr, boolean isBridgeMemberTest)
public void createAndExecCQNoName(VM vm, java.lang.String queryStr)
public void executeCQ(VM vm, java.lang.String cqName, boolean initialResults, java.lang.String expectedErr)
public 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 executeAndCloseAndExecuteIRMultipleTimes(VM vm, java.lang.String cqName, java.lang.String queryStr)
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 testCQRemainsWhenServerGCs()
throws java.lang.Exception
java.lang.Exceptionpublic 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 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 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 testCQWhereCondOnShort()
throws java.lang.Exception
java.lang.Exceptionpublic void testCQEquals()
throws java.lang.Exception
java.lang.Exceptionpublic void testCQEqualsWithIndex()
throws java.lang.Exception
java.lang.Exceptionpublic void testCQAllServersCrash()
throws java.lang.Exception
java.lang.Exceptionpublic void testCQAllServersLeave()
throws java.lang.Exception
java.lang.Exceptionpublic void testCQAllServersLeaveAndRejoin()
throws java.lang.Exception
java.lang.Exceptionpublic void testCQPrimaryLeaves()
throws java.lang.Exception
java.lang.Exceptionpublic void testCQAllServersLeaveMultiplePool()
throws java.lang.Exception
java.lang.Exceptionpublic void testCqCloseAndExecuteWithInitialResults()
throws java.lang.Exception
java.lang.Exceptionpublic void restartBridgeServer(VM server, int port)
public 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.