public class JmxRegionResourcesCleanupDUnitTest extends AdminDUnitTestCase
1. Start agent from current client VM (VM#4)
2. From client VM, invoke connectToSystem on agent VM. Collect reference to
distributed system MBean in setUp.
3. Start the cache & initialize the system in cache VM (CACHE_VM i.e. VM#0).
4. From client VM, invoke manageSystemMemberApplications on distributed
system MBean (in step 2). On the SystemMember manageStat methods is called
over JMX.
5. Create a region region_1 in the cache VM. Count number number of region
JMX resources in JMX client VM.
6. Create a region region_2 in the cache VM. Count number number of region
JMX resources in JMX client VM.
7. Remove region_1 & region_2 in the cache VM. Count number number of region
JMX resources in JMX client VM. The count should be zero (same as before
creating region_1).
8. Stop the cache & disconnect the cacheVM from the DS.
DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2| Modifier and Type | Field and Description |
|---|---|
protected static String |
REGION_NAME1 |
protected static String |
REGION_NAME2 |
protected static Map<String,String> |
regionPaths
map to store region paths against region names
|
agent, AGENT_VM, debug, NUM_RETRY, RETRY_INTERVAL, shutdownThread, tcSystem, urlStringcachelogPerTest, reconnect, system, testName| Constructor and Description |
|---|
JmxRegionResourcesCleanupDUnitTest(String name) |
| Modifier and Type | Method and Description |
|---|---|
Properties |
getDistributedSystemProperties()
Over-ridden to ensure that all the members connect to the same distributed
system.
|
static void |
initDSProperties()
Initializes the properties for the distributed system to be started.
|
protected boolean |
isJMX()
Whether JMX is to be used in this test case.
|
void |
setUp()
In addition to the setup done by the superclass, also creates a
DistributedSystem admin object. |
void |
tearDown2()
Destroys the
DistributedSystem created in AdminDUnitTestCase.setUp()
and performs the tear down inherited from the superclass. |
void |
testCleanUp()
Test to check clean up of managed stats resources.
|
assertAgent, assertLog, createDistributedSystem, disconnect, getAdminDistributedSystem, getDistributedMember, getDistributionConfig, getLocators, isRMI, isSSL, reconnectToSystem, startAgent, stopAgentaddExceptionTag1, 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, 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 final String REGION_NAME1
protected static final String REGION_NAME2
public JmxRegionResourcesCleanupDUnitTest(String name)
protected boolean isJMX()
true.isJMX in class AdminDUnitTestCasepublic void testCleanUp()
throws Exception
Exception - one of the reasons could be failure of JMX operationspublic Properties getDistributedSystemProperties()
getDistributedSystemProperties in class DistributedTestCasepublic static void initDSProperties()
public void setUp()
throws Exception
AdminDUnitTestCaseDistributedSystem admin object.setUp in class AdminDUnitTestCaseExceptionpublic void tearDown2()
throws Exception
AdminDUnitTestCaseDistributedSystem created in AdminDUnitTestCase.setUp()
and performs the tear down inherited from the superclass.tearDown2 in class AdminDUnitTestCaseExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.