public class HAStartupAndFailoverDUnitTest extends DistributedTestCase
DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2| Modifier and Type | Field and Description |
|---|---|
protected static com.gemstone.gemfire.cache.Cache |
cache |
protected static boolean |
identifiedPrimary |
protected static com.gemstone.gemfire.cache.client.internal.PoolImpl |
pool |
logPerTest, reconnect, system, testName| Constructor and Description |
|---|
HAStartupAndFailoverDUnitTest(java.lang.String name)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
static void |
closeCache() |
static void |
createClientCache(java.lang.String testName,
java.lang.String host) |
static void |
createClientCacheWithIncorrectPrimary(java.lang.String testName,
java.lang.String host) |
static void |
createClientCacheWithLargeRetryInterval(java.lang.String testName,
java.lang.String host) |
static void |
createClientCacheWithLargeRetryIntervalAndWithoutCallbackConnection(java.lang.String testName,
java.lang.String host) |
static java.lang.Integer |
createServerCache() |
static void |
put() |
static void |
setBridgeObserver() |
void |
setUp()
Sets up the test (noop).
|
static void |
startServer() |
static void |
stopServer() |
void |
tearDown2()
Tears down the test.
|
void |
testCacheClientUpdaterInitiatesFailoverOnBothPrimaryAndSecondaryFailure()
Tests failover initialization by cacheClientUpdater Thread failure on both
Primary and Secondary server
|
void |
testCacheClientUpdaterInitiatesFailoverOnBothPrimaryAndSecondaryFailureWithServerMonitors()
Tests failover initialization by cacheClientUpdater Thread
|
void |
testCacheClientUpdaterInitiatesFailoverOnSecondaryFailure()
Tests failover initialization by cacheClientUpdater
Thread on failure on Secondary server
|
void |
testCacheClientUpdatersInitiatesFailoverOnPrimaryFailure()
Tests failover initialization by cacheClientUpdater Thread
on failure in Primary Server
|
void |
testExceptionWhileMakingPrimary()
verify that when an exeption occurs during making primary ,
new primary will be selected
|
void |
testInitiateFailoverByCacheOperationThreads_Secondary()
Tests failover initialization by cache operation Threads on secondary
|
void |
testPrimaryFailover()
Stops primary server one by one to ensure new primary is selected
|
void |
testPrimaryShouldBeNullAndEPListShouldBeEmptyWhenAllServersAreDead()
verify that Primary Should Be Null And EPList Should Be Empty When All Servers Are Dead
|
void |
testTwoPrimaryFailedOneAfterTheAnother()
verify that when an exeption occurs during making primary to two EPs ,
new primary will be selected
|
static void |
unSetBridgeObserver() |
static void |
verifyDeadAndLiveServers(int expectedDeadServers,
int expectedLiveServers) |
static void |
verifyDispatcherIsAlive() |
static void |
verifyDispatcherIsNotAlive() |
static void |
verifyPrimaryShouldBeNullAndEPListShouldBeEmpty() |
static void |
verifyPrimaryShouldNotBeNullAndEPListShouldNotBeEmpty() |
static void |
waitForPrimaryIdentification() |
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.cache.Cache cache
protected static com.gemstone.gemfire.cache.client.internal.PoolImpl pool
protected static boolean identifiedPrimary
public HAStartupAndFailoverDUnitTest(java.lang.String name)
public void setUp()
throws java.lang.Exception
DistributedTestCasesetUp in class DistributedTestCasejava.lang.Exceptionpublic void testPrimaryFailover()
throws java.lang.Exception
java.lang.Exceptionpublic void testExceptionWhileMakingPrimary()
throws java.lang.Exception
java.lang.Exceptionpublic void testTwoPrimaryFailedOneAfterTheAnother()
throws java.lang.Exception
java.lang.Exceptionpublic void testPrimaryShouldBeNullAndEPListShouldBeEmptyWhenAllServersAreDead()
throws java.lang.Exception
java.lang.Exceptionpublic void testCacheClientUpdatersInitiatesFailoverOnPrimaryFailure()
throws java.lang.Exception
java.lang.Exceptionpublic void testCacheClientUpdaterInitiatesFailoverOnSecondaryFailure()
throws java.lang.Exception
java.lang.Exceptionpublic void testCacheClientUpdaterInitiatesFailoverOnBothPrimaryAndSecondaryFailure()
throws java.lang.Exception
java.lang.Exceptionpublic void testCacheClientUpdaterInitiatesFailoverOnBothPrimaryAndSecondaryFailureWithServerMonitors()
throws java.lang.Exception
java.lang.Exceptionpublic void testInitiateFailoverByCacheOperationThreads_Secondary()
throws java.lang.Exception
java.lang.Exceptionpublic static void put()
public static void verifyDeadAndLiveServers(int expectedDeadServers,
int expectedLiveServers)
public static void setBridgeObserver()
public static void unSetBridgeObserver()
public static void stopServer()
public static void verifyPrimaryShouldNotBeNullAndEPListShouldNotBeEmpty()
public static void verifyPrimaryShouldBeNullAndEPListShouldBeEmpty()
public static void startServer()
public static void waitForPrimaryIdentification()
public static void verifyDispatcherIsAlive()
public static void verifyDispatcherIsNotAlive()
public static void createClientCache(java.lang.String testName,
java.lang.String host)
throws java.lang.Exception
java.lang.Exceptionpublic static void createClientCacheWithLargeRetryInterval(java.lang.String testName,
java.lang.String host)
throws java.lang.Exception
java.lang.Exceptionpublic static void createClientCacheWithLargeRetryIntervalAndWithoutCallbackConnection(java.lang.String testName,
java.lang.String host)
throws java.lang.Exception
java.lang.Exceptionpublic static void createClientCacheWithIncorrectPrimary(java.lang.String testName,
java.lang.String host)
throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.Integer createServerCache()
throws java.lang.Exception
java.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 static void closeCache()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.