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(String name)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
static void |
closeCache() |
static void |
createClientCache(String testName,
String host) |
static void |
createClientCacheWithIncorrectPrimary(String testName,
String host) |
static void |
createClientCacheWithLargeRetryInterval(String testName,
String host) |
static void |
createClientCacheWithLargeRetryIntervalAndWithoutCallbackConnection(String testName,
String host) |
static 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(String name)
public void setUp()
throws Exception
DistributedTestCasesetUp in class DistributedTestCaseExceptionpublic void testPrimaryFailover()
throws Exception
Exceptionpublic void testExceptionWhileMakingPrimary()
throws Exception
Exceptionpublic void testTwoPrimaryFailedOneAfterTheAnother()
throws Exception
Exceptionpublic void testPrimaryShouldBeNullAndEPListShouldBeEmptyWhenAllServersAreDead()
throws Exception
Exceptionpublic void testCacheClientUpdatersInitiatesFailoverOnPrimaryFailure()
throws Exception
Exceptionpublic void testCacheClientUpdaterInitiatesFailoverOnSecondaryFailure()
throws Exception
Exceptionpublic void testCacheClientUpdaterInitiatesFailoverOnBothPrimaryAndSecondaryFailure()
throws Exception
Exceptionpublic void testCacheClientUpdaterInitiatesFailoverOnBothPrimaryAndSecondaryFailureWithServerMonitors()
throws Exception
Exceptionpublic void testInitiateFailoverByCacheOperationThreads_Secondary()
throws Exception
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(String testName, String host) throws Exception
Exceptionpublic static void createClientCacheWithLargeRetryInterval(String testName, String host) throws Exception
Exceptionpublic static void createClientCacheWithLargeRetryIntervalAndWithoutCallbackConnection(String testName, String host) throws Exception
Exceptionpublic static void createClientCacheWithIncorrectPrimary(String testName, String host) throws Exception
Exceptionpublic void tearDown2()
throws Exception
DistributedTestCaseDistributedTestCase.tearDown() method, and should be over ridden in its place.tearDown2 in class DistributedTestCaseExceptionpublic static void closeCache()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.