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 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 MBeanServer |
mbeanServer |
logPerTest, reconnect, system, testName| Constructor and Description |
|---|
ManagementTestBase(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,
String regionPath)
closes a Distributed Region
|
com.gemstone.gemfire.cache.Cache |
createCache(boolean management) |
com.gemstone.gemfire.cache.Cache |
createCache(Properties props) |
void |
createCache(VM vm1) |
void |
createCache(VM vm1,
Properties props) |
protected void |
createDistributedRegion(VM vm,
String regionName)
Creates a Distributed region
|
protected AsyncInvocation |
createDistributedRegionAsync(VM vm,
String regionName)
Creates a Distributed Region
|
protected void |
createLocalRegion(VM vm,
String localRegionName)
Creates a Local region
|
void |
createManagementCache(VM vm1) |
protected void |
createPartitionRegion(VM vm,
String partitionRegionName)
Creates a partition Region
|
protected void |
createSubRegion(VM vm,
String parentRegionPath,
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 List<VM> |
getManagedNodeList() |
static com.gemstone.gemfire.management.ManagementService |
getManagementService() |
static VM |
getManagingNode() |
com.gemstone.gemfire.distributed.DistributedMember |
getMember(VM vm) |
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,
String key,
String value,
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(ObjectName objectName,
Class interfaceClass) |
void |
waitForRefresh(int expectedRefreshCount,
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 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 MBeanServer mbeanServer
public ManagementTestBase(String name)
public void setUp()
throws Exception
DistributedTestCasesetUp in class DistributedTestCaseExceptionpublic void tearDown2()
throws Exception
DistributedTestCaseDistributedTestCase.tearDown() method, and should be over ridden in its place.tearDown2 in class DistributedTestCaseExceptionpublic void enableManagement()
Exceptionpublic void disableManagement()
Exceptionpublic void initManagement(boolean managingNodeFirst)
throws Exception
Exceptionpublic void createCache(VM vm1, Properties props) throws Exception
Exceptionpublic com.gemstone.gemfire.cache.Cache createCache(Properties props)
public com.gemstone.gemfire.cache.Cache getCache()
public com.gemstone.gemfire.cache.Cache createCache(boolean management)
protected void waitForProxy(ObjectName objectName, Class interfaceClass)
protected void runManagementTaskAdhoc()
public void startManagingNode(VM vm1) throws Exception
Exceptionpublic void startBeingManagingNode()
public void startManagingNodeAsync(VM vm1) throws Exception
Exceptionpublic void stopManagingNode(VM vm1) throws Exception
Exceptionpublic void checkManagedNodeCleanup(VM vm) throws Exception
Exceptionpublic void checkProxyCleanup(VM vm) throws Exception
Exceptionpublic boolean checkManagementExceptions(com.gemstone.gemfire.management.ManagementException e)
e - public static VM getManagingNode()
public static com.gemstone.gemfire.management.ManagementService getManagementService()
protected void createDistributedRegion(VM vm, String regionName) throws Exception
protected void createLocalRegion(VM vm, String localRegionName) throws Exception
protected void createSubRegion(VM vm, String parentRegionPath, String subregionName) throws Exception
protected void putInDistributedRegion(VM vm, String key, String value, String regionPath)
vm - protected AsyncInvocation createDistributedRegionAsync(VM vm, String regionName)
vm - protected void createPartitionRegion(VM vm, String partitionRegionName)
vm - protected void closeRegion(VM vm, String regionPath)
vm - public void waitForAllMembers(int expectedCount)
public void waitForRefresh(int expectedRefreshCount,
ObjectName objectName)
public com.gemstone.gemfire.distributed.DistributedMember getMember(VM vm)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.