public abstract class AdminDUnitTestCase extends CacheTestCase
CacheTestCase because it is easiest to test the
administration of cache-related components.
Admin tests that test JMX behavior should override methods like
isJMX() and isRMI().
DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2| Modifier and Type | Field and Description |
|---|---|
protected com.gemstone.gemfire.admin.jmx.Agent |
agent
The JMX agent optionally started by this test
|
protected static int |
AGENT_VM
The index of the VM in which the JMX Agent is hosted
|
protected boolean |
debug |
static int |
NUM_RETRY |
static int |
RETRY_INTERVAL |
protected static Thread |
shutdownThread
A shutdown hook that is used for debugging
|
protected com.gemstone.gemfire.admin.AdminDistributedSystem |
tcSystem
The
DistributedSystem admin object created for this
test |
protected String |
urlString
The URL on which the RMI agent runs
|
cachelogPerTest, reconnect, system, testName| Constructor and Description |
|---|
AdminDUnitTestCase(String name)
Creates a new
AdminDUnitTestCase |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertAgent() |
protected static void |
assertLog(String log,
int minEntries)
Asserts that a log has at least the given number of entries.
|
protected com.gemstone.gemfire.admin.AdminDistributedSystem |
createDistributedSystem(String mcastAddress,
int mcastPort,
String locators,
String remoteCommand)
Creates a new
DistributedSystem with the given
configuration. |
protected void |
disconnect() |
com.gemstone.gemfire.admin.AdminDistributedSystem |
getAdminDistributedSystem() |
protected static com.gemstone.gemfire.distributed.DistributedMember |
getDistributedMember()
Returns DistributedMember instance if connected to the dist system.
|
com.gemstone.gemfire.distributed.internal.DistributionConfig |
getDistributionConfig()
Returns the distribution configuration for this test.
|
protected String |
getLocators(com.gemstone.gemfire.distributed.internal.DistributionConfig config) |
protected boolean |
isJMX()
Returns whether or not this test exercises JMX behavior.
|
protected boolean |
isRMI()
Returns whether or not this test exercises JMX RMI behavior.
|
protected boolean |
isSSL()
Returns whether or not this test exercises JMX RMI SSL behavior.
|
void |
reconnectToSystem() |
void |
setUp()
In addition to the setup done by the superclass, also creates a
DistributedSystem admin object. |
protected void |
startAgent()
Starts the JMX Agent
|
protected void |
stopAgent() |
void |
tearDown2()
Destroys the
DistributedSystem created in setUp()
and performs the tear down inherited from the superclass. |
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, 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, toStringprotected static final int AGENT_VM
protected transient com.gemstone.gemfire.admin.AdminDistributedSystem tcSystem
DistributedSystem admin object created for this
testprotected final transient boolean debug
protected static final Thread shutdownThread
protected transient com.gemstone.gemfire.admin.jmx.Agent agent
protected String urlString
public static final int NUM_RETRY
public static final int RETRY_INTERVAL
public AdminDUnitTestCase(String name)
AdminDUnitTestCasepublic void reconnectToSystem()
protected String getLocators(com.gemstone.gemfire.distributed.internal.DistributionConfig config)
public void setUp()
throws Exception
DistributedSystem admin object.setUp in class DistributedTestCaseExceptionpublic void tearDown2()
throws Exception
DistributedSystem created in setUp()
and performs the tear down inherited from the superclass.tearDown2 in class CacheTestCaseExceptionpublic com.gemstone.gemfire.admin.AdminDistributedSystem getAdminDistributedSystem()
throws Exception
Exceptionprotected static com.gemstone.gemfire.distributed.DistributedMember getDistributedMember()
public com.gemstone.gemfire.distributed.internal.DistributionConfig getDistributionConfig()
protected void disconnect()
protected com.gemstone.gemfire.admin.AdminDistributedSystem createDistributedSystem(String mcastAddress, int mcastPort, String locators, String remoteCommand) throws com.gemstone.gemfire.admin.AdminException
DistributedSystem with the given
configuration. Note that the DistributedSystem will
log to DUnit's (Hydra's) log file. The actual type of
DistributedSystem that is returned depends on
whether or not this test tests JMX behavior.com.gemstone.gemfire.admin.AdminExceptionprotected boolean isJMX()
false.protected boolean isRMI()
false.protected boolean isSSL()
false.protected static void assertLog(String log, int minEntries) throws IOException
IOExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.