public class JmxStatResourcesCleanupDUnitTest 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. Stop the cache & disconnect the cacheVM from the DS.
6. Checks if the count of all the created managed statistics resources has
become zero again.
DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2agent, AGENT_VM, debug, NUM_RETRY, RETRY_INTERVAL, shutdownThread, tcSystem, urlStringcachelogPerTest, reconnect, system, testName| Constructor and Description |
|---|
JmxStatResourcesCleanupDUnitTest(String name) |
| Modifier and Type | Method and Description |
|---|---|
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, 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, toStringpublic JmxStatResourcesCleanupDUnitTest(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 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.