public class HAInterestBaseTest extends DistributedTestCase
DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2| Modifier and Type | Field and Description |
|---|---|
protected static com.gemstone.gemfire.cache.Cache |
cache |
protected static java.lang.String |
client_k1 |
protected static java.lang.String |
client_k2 |
protected static com.gemstone.gemfire.cache.client.internal.Connection |
conn |
protected static boolean |
exceptionOccured |
protected static Host |
host |
protected static boolean |
isAfterRegistrationCallbackCalled |
protected static boolean |
isBeforeInterestRecoveryCallbackCalled |
protected static boolean |
isBeforeRegistrationCallbackCalled |
protected static java.lang.String |
k1 |
protected static java.lang.String |
k2 |
protected static com.gemstone.gemfire.cache.client.internal.PoolImpl |
pool |
protected static int |
PORT1 |
protected static int |
PORT2 |
protected static int |
PORT3 |
protected static java.lang.String |
REGION_NAME |
protected static java.lang.String |
server_k1 |
protected static java.lang.String |
server_k1_updated |
protected static java.lang.String |
server_k2 |
protected static VM |
server1 |
protected static VM |
server2 |
protected static VM |
server3 |
logPerTest, reconnect, system, testName| Constructor and Description |
|---|
HAInterestBaseTest(java.lang.String name)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
static void |
closeCache() |
static void |
createClientPoolCache(java.lang.String testName,
java.lang.String host) |
static void |
createClientPoolCacheConnectionToSingleServer(java.lang.String testName,
java.lang.String hostName) |
static void |
createClientPoolCacheWithSmallRetryInterval(java.lang.String testName,
java.lang.String host) |
static void |
createEntriesK1andK2() |
static void |
createEntriesK1andK2OnServer() |
static java.lang.Integer |
createServerCache() |
static java.lang.Integer |
createServerCacheWithLocalRegion() |
static void |
createServerEntriesK1andK2() |
static VM |
getBackupVM() |
static VM |
getBackupVM(VM stoppedBackup) |
static VM |
getPrimaryVM()
Return the current primary waiting for a primary to exist.
|
static VM |
getPrimaryVM(VM oldPrimary)
Return the current primary waiting for a primary to exist and for it
not to be the oldPrimary (if oldPrimary is NOT null).
|
static int |
getServerPort(VM vm)
Given a server vm (server1, server2, or server3) return its port.
|
static VM |
getServerVM(int port)
Given a server port (PORT1, PORT2, or PORT3) return its vm.
|
static void |
putK1andK2() |
static void |
registerK1AndK2() |
static void |
registerK1AndK2OnPrimaryAndSecondaryAndVerifyResponse() |
static void |
reRegisterK1AndK2() |
static void |
setBridgeObserverForAfterRegistration(VM vm) |
static void |
setBridgeObserverForBeforeInterestRecovery() |
static void |
setBridgeObserverForBeforeInterestRecoveryFailure() |
static void |
setBridgeObserverForBeforeRegistration(VM vm) |
void |
setUp()
Sets up the test (noop).
|
static void |
startServer() |
static void |
startServerAndPause() |
static void |
stopBothPrimaryAndSecondaryAndRegisterK1AndK2AndVerifyResponse() |
static void |
stopPrimaryAndRegisterK1AndK2AndVerifyResponse() |
static void |
stopPrimaryAndUnregisterRegisterK1() |
static VM |
stopSecondaryAndRegisterK1AndK2AndVerifyResponse()
returns the secondary that was stopped
|
static VM |
stopSecondaryAndUNregisterK1()
returns the secondary that was stopped
|
static void |
stopServer() |
void |
tearDown2()
Tears down the test.
|
static void |
unSetBridgeObserverForRegistrationCallback() |
static void |
verifyDeadAndLiveServers(int expectedDeadServers,
int expectedLiveServers) |
static void |
verifyDispatcherIsAlive() |
static void |
verifyDispatcherIsNotAlive() |
static void |
verifyInterestRegistration() |
static void |
verifyInterestUNRegistration() |
static void |
verifyRefreshedEntriesFromServer() |
static void |
waitForAfterRegistrationCallback() |
static void |
waitForBeforeInterestRecoveryCallBack() |
static void |
waitForBeforeRegistrationCallback() |
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 com.gemstone.gemfire.cache.client.internal.Connection conn
protected static int PORT1
protected static int PORT2
protected static int PORT3
protected static final java.lang.String k1
protected static final java.lang.String k2
protected static final java.lang.String client_k1
protected static final java.lang.String client_k2
protected static final java.lang.String server_k1
protected static final java.lang.String server_k2
protected static final java.lang.String server_k1_updated
protected static boolean isBeforeRegistrationCallbackCalled
protected static boolean isBeforeInterestRecoveryCallbackCalled
protected static boolean isAfterRegistrationCallbackCalled
protected static final java.lang.String REGION_NAME
protected static Host host
protected static VM server1
protected static VM server2
protected static VM server3
protected static volatile boolean exceptionOccured
public void setUp()
throws java.lang.Exception
DistributedTestCasesetUp in class DistributedTestCasejava.lang.Exceptionpublic static VM getPrimaryVM()
public static VM getPrimaryVM(VM oldPrimary)
public static VM getBackupVM()
public static int getServerPort(VM vm)
public static VM getServerVM(int port)
public static void verifyRefreshedEntriesFromServer()
public static void verifyDeadAndLiveServers(int expectedDeadServers,
int expectedLiveServers)
public static void putK1andK2()
public static void setBridgeObserverForBeforeInterestRecoveryFailure()
public static void setBridgeObserverForBeforeInterestRecovery()
public static void waitForBeforeInterestRecoveryCallBack()
public static void setBridgeObserverForBeforeRegistration(VM vm)
public static void waitForBeforeRegistrationCallback()
public static void setBridgeObserverForAfterRegistration(VM vm)
public static void waitForAfterRegistrationCallback()
public static void unSetBridgeObserverForRegistrationCallback()
public static void verifyDispatcherIsAlive()
public static void verifyDispatcherIsNotAlive()
public static void createEntriesK1andK2OnServer()
public static void createEntriesK1andK2()
public static void createServerEntriesK1andK2()
public static void registerK1AndK2()
public static void reRegisterK1AndK2()
public static void startServer()
public static void startServerAndPause()
public static void stopServer()
public static void stopPrimaryAndRegisterK1AndK2AndVerifyResponse()
public static void stopPrimaryAndUnregisterRegisterK1()
public static void stopBothPrimaryAndSecondaryAndRegisterK1AndK2AndVerifyResponse()
public static VM stopSecondaryAndRegisterK1AndK2AndVerifyResponse()
public static VM stopSecondaryAndUNregisterK1()
public static void registerK1AndK2OnPrimaryAndSecondaryAndVerifyResponse()
public static void verifyInterestRegistration()
public static void verifyInterestUNRegistration()
public static void createClientPoolCache(java.lang.String testName,
java.lang.String host)
throws java.lang.Exception
java.lang.Exceptionpublic static void createClientPoolCacheWithSmallRetryInterval(java.lang.String testName,
java.lang.String host)
throws java.lang.Exception
java.lang.Exceptionpublic static void createClientPoolCacheConnectionToSingleServer(java.lang.String testName,
java.lang.String hostName)
throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.Integer createServerCache()
throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.Integer createServerCacheWithLocalRegion()
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.