public class ManagementTestBase extends DistributedTestCase
DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2| Modifier and Type | Field and Description |
|---|---|
protected static com.gemstone.gemfire.distributed.DistributedSystem |
ds
Distributed System
|
protected static VM |
locatorVM |
protected static VM |
managedNode1 |
protected static VM |
managedNode2 |
protected static VM |
managedNode3 |
protected static java.util.List<VM> |
managedNodeList
List containing all the Managed Node VM
|
protected static com.gemstone.gemfire.management.ManagementService |
managementService
Management Service
|
protected static VM |
managingNode
Managing Node VM
|
protected static javax.management.MBeanServer |
mbeanServer |
logPerTest, reconnect, system, testName| Constructor and Description |
|---|
ManagementTestBase(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkManagedNodeCleanup(VM vm)
Check various resources clean up Once a VM stops being managable it should
remove all the artifacts of management namely a) Notification region b)
Monitoring Region c) Management task should stop
|
boolean |
checkManagementExceptions(com.gemstone.gemfire.management.ManagementException e)
All the expected exceptions are checked here
|
void |
checkProxyCleanup(VM vm)
Check various resources clean up Once a VM stops being Managing.It should
remove all the artifacts of management namely a) proxies b) Monitoring
Region c) Management task should stop
|
void |
closeAllCache() |
void |
closeCache(VM vm1) |
protected void |
closeRegion(VM vm,
java.lang.String regionPath)
closes a Distributed Region
|
com.gemstone.gemfire.cache.Cache |
createCache(boolean management) |
com.gemstone.gemfire.cache.Cache |
createCache(java.util.Properties props) |
void |
createCache(VM vm1) |
void |
createCache(VM vm1,
java.util.Properties props) |
protected void |
createDistributedRegion(VM vm,
java.lang.String regionName)
Creates a Distributed region
|
protected AsyncInvocation |
createDistributedRegionAsync(VM vm,
java.lang.String regionName)
Creates a Distributed Region
|
protected void |
createLocalRegion(VM vm,
java.lang.String localRegionName)
Creates a Local region
|
void |
createManagementCache(VM vm1) |
protected void |
createPartitionRegion(VM vm,
java.lang.String partitionRegionName)
Creates a partition Region
|
protected void |
createSubRegion(VM vm,
java.lang.String parentRegionPath,
java.lang.String subregionName)
Creates a Sub region
|
void |
disableManagement()
Disable system property gemfire.disableManagement true in each VM.
|
void |
enableManagement()
Enable system property gemfire.disableManagement false in each VM.
|
com.gemstone.gemfire.cache.Cache |
getCache() |
static java.util.List<VM> |
getManagedNodeList() |
static com.gemstone.gemfire.management.ManagementService |
getManagementService() |
static VM |
getManagingNode() |
com.gemstone.gemfire.distributed.DistributedMember |
getMember(VM vm) |
java.lang.String |
getMemberId(VM vm) |
void |
initManagement(boolean managingNodeFirst)
managingNodeFirst variable tests for two different test cases where
Managing & Managed Node creation time lines are reversed.
|
protected void |
putInDistributedRegion(VM vm,
java.lang.String key,
java.lang.String value,
java.lang.String regionPath)
Puts in distributed region
|
protected void |
runManagementTaskAdhoc() |
void |
setUp()
Sets up the test (noop).
|
void |
startBeingManagingNode() |
void |
startManagingNode(VM vm1)
Marks a VM as Managing
|
void |
startManagingNodeAsync(VM vm1)
Marks a VM as Managing
|
void |
stopManagingNode(VM vm1)
Stops a VM as a Managing node
|
void |
tearDown2()
Tears down the test.
|
void |
waitForAllMembers(int expectedCount) |
protected void |
waitForProxy(javax.management.ObjectName objectName,
java.lang.Class interfaceClass) |
void |
waitForRefresh(int expectedRefreshCount,
javax.management.ObjectName objectName) |
addExpectedException, addExpectedException, addHydraProperties, attachDebugger, checkBBFlag, cleanupAllVms, clearBBFlag, crashDistributedSystem, crashDistributedSystem, createLogWriter, disconnectAllFromDS, disconnectFromDS, 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 com.gemstone.gemfire.distributed.DistributedSystem ds
protected static java.util.List<VM> managedNodeList
protected static VM managingNode
protected static com.gemstone.gemfire.management.ManagementService managementService
protected static VM managedNode1
protected static VM managedNode2
protected static VM managedNode3
protected static VM locatorVM
protected static javax.management.MBeanServer mbeanServer
public void setUp()
throws java.lang.Exception
DistributedTestCasesetUp in class DistributedTestCasejava.lang.Exceptionpublic void tearDown2()
throws java.lang.Exception
DistributedTestCaseDistributedTestCase.tearDown() method, and should be over ridden in its place.tearDown2 in class DistributedTestCasejava.lang.Exceptionpublic void closeAllCache()
throws java.lang.Exception
java.lang.Exceptionpublic void enableManagement()
java.lang.Exceptionpublic void disableManagement()
java.lang.Exceptionpublic void initManagement(boolean managingNodeFirst)
throws java.lang.Exception
java.lang.Exceptionpublic void createCache(VM vm1) throws java.lang.Exception
java.lang.Exceptionpublic void createCache(VM vm1, java.util.Properties props) throws java.lang.Exception
java.lang.Exceptionpublic com.gemstone.gemfire.cache.Cache createCache(java.util.Properties props)
public com.gemstone.gemfire.cache.Cache getCache()
public com.gemstone.gemfire.cache.Cache createCache(boolean management)
public void createManagementCache(VM vm1) throws java.lang.Exception
java.lang.Exceptionpublic void closeCache(VM vm1) throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getMemberId(VM vm)
protected void waitForProxy(javax.management.ObjectName objectName,
java.lang.Class interfaceClass)
protected void runManagementTaskAdhoc()
public void startManagingNode(VM vm1) throws java.lang.Exception
java.lang.Exceptionpublic void startBeingManagingNode()
public void startManagingNodeAsync(VM vm1) throws java.lang.Exception
java.lang.Exceptionpublic void stopManagingNode(VM vm1) throws java.lang.Exception
java.lang.Exceptionpublic void checkManagedNodeCleanup(VM vm) throws java.lang.Exception
java.lang.Exceptionpublic void checkProxyCleanup(VM vm) throws java.lang.Exception
java.lang.Exceptionpublic boolean checkManagementExceptions(com.gemstone.gemfire.management.ManagementException e)
e - public static java.util.List<VM> getManagedNodeList()
public static VM getManagingNode()
public static com.gemstone.gemfire.management.ManagementService getManagementService()
protected void createDistributedRegion(VM vm, java.lang.String regionName) throws java.lang.Exception
vm - reference to VMregionName - name of the distributed regionjava.lang.Throwablejava.lang.Exceptionprotected void createLocalRegion(VM vm, java.lang.String localRegionName) throws java.lang.Exception
vm - reference to VMlocalRegionName - name of the local regionjava.lang.Throwablejava.lang.Exceptionprotected void createSubRegion(VM vm, java.lang.String parentRegionPath, java.lang.String subregionName) throws java.lang.Exception
vm - reference to VMlocalRegionName - name of the local regionjava.lang.Throwablejava.lang.Exceptionprotected void putInDistributedRegion(VM vm, java.lang.String key, java.lang.String value, java.lang.String regionPath)
vm - protected AsyncInvocation createDistributedRegionAsync(VM vm, java.lang.String regionName)
vm - protected void createPartitionRegion(VM vm, java.lang.String partitionRegionName)
vm - protected void closeRegion(VM vm, java.lang.String regionPath)
vm - public void waitForAllMembers(int expectedCount)
public void waitForRefresh(int expectedRefreshCount,
javax.management.ObjectName objectName)
public com.gemstone.gemfire.distributed.DistributedMember getMember(VM vm)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.