public class DurableClientDUnitTest extends DistributedTestCase
DurableClientDUnitTest tests durable client
functionality.| Modifier and Type | Class and Description |
|---|---|
class |
DurableClientDUnitTest.CqExceptionDueToActivatingClientTestHook |
class |
DurableClientDUnitTest.RejectClientReconnectTestHook |
DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2| Modifier and Type | Field and Description |
|---|---|
protected VM |
durableClientVM |
protected static boolean |
isPrimaryRecovered |
protected VM |
publisherClientVM |
protected String |
regionName |
protected VM |
server1VM |
protected VM |
server2VM |
logPerTest, reconnect, system, testName| Constructor and Description |
|---|
DurableClientDUnitTest(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkCqListenerEvents(VM vm,
String cqName,
int numEvents,
int numEventsToWaitFor,
int secondsToWait) |
protected void |
checkCqStatOnServer(VM server,
String durableClientId,
String cqName,
int expectedNumber) |
protected static boolean |
checkForAck(com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy proxy)
This is an incredibly ugly test to see if we got an ack from the client.
|
protected void |
checkHAQueueSize(VM server,
String durableClientId,
int expectedNumber,
int remaining) |
protected void |
checkInterestEvents(VM vm,
String regionName,
int numEvents) |
protected static void |
checkNumberOfClientProxies(int expected) |
protected void |
checkNumDurableCqs(VM server,
String durableClientId,
int expectedNumber) |
void |
checkPrimaryRecovery() |
protected void |
checkPrimaryUpdater(VM vm) |
protected static void |
checkProxyIsAlive(com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy proxy) |
protected void |
closeCache(VM vm) |
void |
closeDurableClient() |
protected com.gemstone.gemfire.cache.query.CqQuery |
createCq(String cqName,
String cqQuery,
boolean durable) |
protected void |
createCq(VM vm,
String cqName,
String cqQuery,
boolean durable) |
void |
disconnectDurableClient() |
void |
disconnectDurableClient(boolean keepAlive) |
void |
durableFailover(int redundancyLevel)
Test a durable client with 2 servers where the client fails over from one to another server
with a publisher/feeder performing operations and the client verifying updates received.
|
void |
durableFailoverAfterReconnect(int redundancyLevel) |
protected void |
flushEntries(VM server,
VM client,
String regionName) |
protected static com.gemstone.gemfire.internal.cache.BridgeServerImpl |
getBridgeServer() |
protected Properties |
getClientDistributedSystemProperties(String durableClientId) |
protected Properties |
getClientDistributedSystemProperties(String durableClientId,
int durableClientTimeout) |
protected Properties |
getClientDistributedSystemPropertiesNonDurable(String durableClientId) |
protected com.gemstone.gemfire.cache.client.Pool |
getClientPool(String host,
int serverPort,
boolean establishCallbackConnection) |
protected com.gemstone.gemfire.cache.client.Pool |
getClientPool(String host,
int server1Port,
int server2Port,
boolean establishCallbackConnection) |
protected com.gemstone.gemfire.cache.client.Pool |
getClientPool(String host,
int server1Port,
int server2Port,
boolean establishCallbackConnection,
int redundancyLevel) |
protected static com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy |
getClientProxy() |
protected static String |
getHARegionQueueName()
Returns the durable client proxy's HARegionQueue region name.
|
protected static int |
getNumberOfClientProxies() |
protected void |
publishEntries(VM vm,
String regionName,
int numEntries) |
protected void |
registerInterest(VM vm,
String regionName,
boolean durable) |
void |
restartDurableClient(Object[] args) |
protected void |
sendClientReady(VM vm) |
static void |
setBridgeObeserverForAfterPrimaryRecovered() |
void |
setPrimaryRecoveryCheck() |
protected static void |
setTestFlagToVerifyActForMarker(Boolean flag) |
void |
setUp()
Sets up the test (noop).
|
protected void |
startClient(VM vm,
int serverPort1,
int serverPort2,
String regionName) |
protected void |
startClient(VM vm,
int serverPort1,
String regionName) |
protected void |
startDurableClient(VM vm,
String durableClientId,
int serverPort1,
int serverPort2,
String regionName) |
protected void |
startDurableClient(VM vm,
String durableClientId,
int serverPort1,
String regionName) |
protected void |
startDurableClient(VM vm,
String durableClientId,
int serverPort1,
String regionName,
int durableTimeoutInSeconds) |
void |
tearDown2()
Tears down the test.
|
void |
test39630()
Test that starting, stopping then restarting a durable client is correctly
processed by the server.
|
void |
testDurableClientConnectServerStopStart()
Test whether a durable client reconnects properly to a server that is
stopped and restarted.
|
void |
testDurableClientPrimaryUpdate()
Test that a durable client correctly receives updates after it reconnects.
|
void |
testDurableHAFailover() |
void |
testDurableNonHAFailover() |
void |
testMultipleBridgeClientsInSingleDurableVM()
Test that a durable client VM with multiple BridgeClients correctly
registers on the server.
|
void |
testReadyForEventsNotCalledImplicitly() |
void |
testReadyForEventsNotCalledImplicitlyForRegisterInterestWithCacheXML() |
void |
testReadyForEventsNotCalledImplicitlyWithCacheXML() |
void |
testSimpleDurableClient()
Test that starting a durable client is correctly processed by the server.
|
void |
testSimpleDurableClientMultipleServers()
Test that starting a durable client on multiple servers is processed
correctly.
|
void |
testSimpleTwoDurableClients()
Test that the server correctly processes starting two durable clients.
|
void |
testStartStopStartDurableClient()
Test that starting, stopping then restarting a durable client is correctly
processed by the server.
|
void |
testStartStopStartDurableClientUpdate()
Test that a durable client correctly receives updates after it reconnects.
|
void |
testStartStopTimeoutDurableClient()
Test that disconnecting a durable client for longer than the timeout
period is correctly processed by the server.
|
protected void |
verifyDurableClientOnServer(VM server,
String durableClientId) |
void |
verifyListenerUpdates(int numEntries) |
void |
verifyListenerUpdates(int numEntries,
int numEntriesBeforeDisconnect) |
void |
verifyListenerUpdatesDisconnected(int numberOfEntries) |
void |
verifyListenerUpdatesEntries(int numEntries,
int numEntriesBeforeDisconnect) |
static void |
verifyReceivedMarkerAck(com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy proxy) |
void |
verifySimpleDurableClient() |
void |
verifySimpleDurableClientMultipleServers() |
void |
XtestMultipleVMsWithSameDurableId()
Test that a second VM with the same durable id cannot connect to the server
while the first VM is connected.
|
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 VM server1VM
protected VM server2VM
protected VM durableClientVM
protected VM publisherClientVM
protected String regionName
protected static volatile boolean isPrimaryRecovered
public DurableClientDUnitTest(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 testSimpleDurableClient()
public void closeDurableClient()
public void disconnectDurableClient()
public void disconnectDurableClient(boolean keepAlive)
public void verifySimpleDurableClient()
public void testStartStopStartDurableClient()
public void test39630()
public void restartDurableClient(Object[] args)
public void testStartStopTimeoutDurableClient()
public void testDurableClientPrimaryUpdate()
public void testStartStopStartDurableClientUpdate()
public void verifyListenerUpdates(int numEntries)
public void verifyListenerUpdates(int numEntries,
int numEntriesBeforeDisconnect)
public void verifyListenerUpdatesEntries(int numEntries,
int numEntriesBeforeDisconnect)
public void verifyListenerUpdatesDisconnected(int numberOfEntries)
public void testMultipleBridgeClientsInSingleDurableVM()
public void XtestMultipleVMsWithSameDurableId()
public void testSimpleTwoDurableClients()
public void testReadyForEventsNotCalledImplicitly()
public void testReadyForEventsNotCalledImplicitlyWithCacheXML()
public void testReadyForEventsNotCalledImplicitlyForRegisterInterestWithCacheXML()
public void testSimpleDurableClientMultipleServers()
public void verifySimpleDurableClientMultipleServers()
public void testDurableClientConnectServerStopStart()
public void testDurableNonHAFailover()
throws InterruptedException
InterruptedExceptionpublic void testDurableHAFailover()
throws InterruptedException
InterruptedExceptionpublic void durableFailover(int redundancyLevel)
throws InterruptedException
InterruptedExceptionpublic void durableFailoverAfterReconnect(int redundancyLevel)
protected com.gemstone.gemfire.cache.query.CqQuery createCq(String cqName, String cqQuery, boolean durable) throws com.gemstone.gemfire.cache.query.CqException, com.gemstone.gemfire.cache.query.CqExistsException
com.gemstone.gemfire.cache.query.CqExceptioncom.gemstone.gemfire.cache.query.CqExistsExceptionprotected com.gemstone.gemfire.cache.client.Pool getClientPool(String host, int serverPort, boolean establishCallbackConnection)
protected com.gemstone.gemfire.cache.client.Pool getClientPool(String host, int server1Port, int server2Port, boolean establishCallbackConnection)
protected Properties getClientDistributedSystemProperties(String durableClientId)
protected Properties getClientDistributedSystemPropertiesNonDurable(String durableClientId)
protected Properties getClientDistributedSystemProperties(String durableClientId, int durableClientTimeout)
protected static com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy getClientProxy()
protected static void checkNumberOfClientProxies(int expected)
protected static void checkProxyIsAlive(com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy proxy)
protected static int getNumberOfClientProxies()
protected static com.gemstone.gemfire.internal.cache.BridgeServerImpl getBridgeServer()
protected com.gemstone.gemfire.cache.client.Pool getClientPool(String host, int server1Port, int server2Port, boolean establishCallbackConnection, int redundancyLevel)
protected static String getHARegionQueueName()
public static void verifyReceivedMarkerAck(com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy proxy)
protected static boolean checkForAck(com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy proxy)
protected static void setTestFlagToVerifyActForMarker(Boolean flag)
public static void setBridgeObeserverForAfterPrimaryRecovered()
public void setPrimaryRecoveryCheck()
public void checkPrimaryRecovery()
protected void sendClientReady(VM vm)
protected void checkCqStatOnServer(VM server, String durableClientId, String cqName, int expectedNumber)
protected void checkHAQueueSize(VM server, String durableClientId, int expectedNumber, int remaining)
protected void checkNumDurableCqs(VM server, String durableClientId, int expectedNumber)
protected void checkCqListenerEvents(VM vm, String cqName, int numEvents, int numEventsToWaitFor, int secondsToWait)
protected void startDurableClient(VM vm, String durableClientId, int serverPort1, String regionName, int durableTimeoutInSeconds)
protected void startDurableClient(VM vm, String durableClientId, int serverPort1, String regionName)
protected void startDurableClient(VM vm, String durableClientId, int serverPort1, int serverPort2, String regionName)
protected void verifyDurableClientOnServer(VM server, String durableClientId)
protected void checkPrimaryUpdater(VM vm)
protected void closeCache(VM vm)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.