public abstract class ClientServerTestCase
extends org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase
Modifier and Type | Class and Description |
---|---|
static class |
ClientServerTestCase.CacheServerCacheLoader |
Modifier and Type | Field and Description |
---|---|
static boolean |
AUTO_LOAD_BALANCE |
static java.lang.String |
BridgeServerKey |
static java.lang.String |
NON_EXISTENT_KEY |
Constructor and Description |
---|
ClientServerTestCase() |
Modifier and Type | Method and Description |
---|---|
static Pool |
configureConnectionPool(AttributesFactory factory,
java.lang.String host,
int[] ports,
boolean establish,
int redundancy,
int connectionsPerServer,
java.lang.String serverGroup) |
static Pool |
configureConnectionPool(AttributesFactory factory,
java.lang.String host,
int[] ports,
boolean establish,
int redundancy,
int connectionsPerServer,
java.lang.String serverGroup,
int pingInterval,
int idleTimeout,
boolean threadLocalCnxs,
int lifetimeTimeout) |
static Pool |
configureConnectionPool(AttributesFactory factory,
java.lang.String host,
int[] ports,
boolean establish,
int redundancy,
int connectionsPerServer,
java.lang.String serverGroup,
int pingInterval,
int idleTimeout,
boolean threadLocalCnxs,
int lifetimeTimeout,
int statisticInterval) |
static Pool |
configureConnectionPool(AttributesFactory factory,
java.lang.String host,
int port1,
int port2,
boolean establish,
int redundancy,
int connectionsPerServer,
java.lang.String serverGroup) |
static Pool |
configureConnectionPool(AttributesFactory factory,
java.lang.String host,
int port1,
int port2,
boolean establish,
int redundancy,
int connectionsPerServer,
java.lang.String serverGroup,
int pingInterval) |
static Pool |
configureConnectionPool(AttributesFactory factory,
java.lang.String host,
int port1,
int port2,
boolean establish,
int redundancy,
int connectionsPerServer,
java.lang.String serverGroup,
int pingInterval,
int idleTimeout,
boolean threadLocalCnxs) |
static Pool |
configureConnectionPool(AttributesFactory factory,
java.lang.String host,
int port1,
int port2,
boolean establish,
int redundancy,
int connectionsPerServer,
java.lang.String serverGroup,
int pingInterval,
int idleTimeout,
boolean threadLocalCnxs,
int lifetimeTimeout) |
static Pool |
configureConnectionPoolWithName(AttributesFactory factory,
java.lang.String host,
int[] ports,
boolean establish,
int redundancy,
int connectionsPerServer,
java.lang.String serverGroup,
java.lang.String poolName) |
static Pool |
configureConnectionPoolWithName(AttributesFactory factory,
java.lang.String host,
int[] ports,
boolean establish,
int redundancy,
int connectionsPerServer,
java.lang.String serverGroup,
java.lang.String poolName,
int pingInterval,
int idleTimeout,
boolean threadLocalCnxs,
int lifetimeTimeout,
int statisticInterval) |
static Pool |
configureConnectionPoolWithNameAndFactory(AttributesFactory factory,
java.lang.String host,
int[] ports,
boolean establish,
int redundancy,
int connectionsPerServer,
java.lang.String serverGroup,
java.lang.String poolName,
PoolFactory pf) |
static Pool |
configureConnectionPoolWithNameAndFactory(AttributesFactory factory,
java.lang.String host,
int[] ports,
boolean establish,
int redundancy,
int connectionsPerServer,
java.lang.String serverGroup,
java.lang.String poolName,
PoolFactory pf,
int pingInterval,
int idleTimeout,
boolean threadLocalCnxs,
int lifetimeTimeout,
int statisticInterval)
this method creates a client connection pool and configures it.
|
static java.lang.String |
createBridgeClientConnection(java.lang.String host,
int[] ports) |
void |
createBridgeServer(org.apache.geode.test.dunit.VM vm,
java.lang.String rName,
int port)
Create a server that has a value for every key queried and a unique key/value in the specified
Region that uniquely identifies each instance.
|
static int[] |
createUniquePorts(int numToCreate) |
protected int |
getMaxThreads()
Defaults to 0 which means no selector in server.
|
protected static DistributedMember |
getMemberId() |
protected RegionAttributes |
getRegionAttributes()
Returns region attributes for a
LOCAL region |
void |
postSetUp() |
protected void |
postSetUpClientServerTestCase() |
void |
preTearDownCacheTestCase() |
protected void |
preTearDownClientServerTestCase() |
int |
startBridgeServer(int port)
Starts a bridge server on the given port
|
void |
stopBridgeServers(Cache cache)
Stops the bridge server that serves up the given cache.
|
addExceptionTag1, basicGetCache, beginCacheXml, closeAllCache, closeCache, createExpiryRootRegion, createLonerCache, createRegion, createRegion, createRootRegion, createRootRegion, finishCacheXml, finishCacheXml, getCache, getCache, getCache, getCache, getCache, getClientCache, getClientCache, getDiskDir, getDiskDirs, getGemfireCache, getRootRegion, getRootRegion, hasCache, postTearDownCacheTestCase, preTearDown, removeExceptionTag1
basicGetSystem, cleanDiskDirs, cleanupAllVms, deleteBACKUPDiskStoreFile, destroyRegions, disconnectAllFromDS, disconnectFromDS, getBlackboard, getDistributedSystemProperties, getLonerSystem, getName, getSystem, getSystem, getSystemStatic, getTestClass, getTestMethodName, getUniqueName, initializeBlackboard, initializeDistributedTestCase, isConnectedToDS, nullSystem, postTearDown, postTearDownAssertions, preSetUp, preTearDownAssertions, setSystem, setUpDistributedTestCase, tearDownDistributedTestCase
public static java.lang.String NON_EXISTENT_KEY
public static boolean AUTO_LOAD_BALANCE
public static final java.lang.String BridgeServerKey
public final void postSetUp() throws java.lang.Exception
postSetUp
in interface org.apache.geode.test.dunit.internal.DistributedTestFixture
postSetUp
in class org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase
java.lang.Exception
protected void postSetUpClientServerTestCase() throws java.lang.Exception
java.lang.Exception
public final void preTearDownCacheTestCase() throws java.lang.Exception
preTearDownCacheTestCase
in interface org.apache.geode.test.dunit.cache.internal.CacheTestFixture
preTearDownCacheTestCase
in class org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase
java.lang.Exception
protected void preTearDownClientServerTestCase() throws java.lang.Exception
java.lang.Exception
public int startBridgeServer(int port) throws java.io.IOException
java.io.IOException
protected int getMaxThreads()
public void stopBridgeServers(Cache cache)
protected RegionAttributes getRegionAttributes()
LOCAL
regionpublic static java.lang.String createBridgeClientConnection(java.lang.String host, int[] ports)
public static Pool configureConnectionPool(AttributesFactory factory, java.lang.String host, int port1, int port2, boolean establish, int redundancy, int connectionsPerServer, java.lang.String serverGroup, int pingInterval, int idleTimeout, boolean threadLocalCnxs, int lifetimeTimeout)
public static Pool configureConnectionPool(AttributesFactory factory, java.lang.String host, int port1, int port2, boolean establish, int redundancy, int connectionsPerServer, java.lang.String serverGroup, int pingInterval, int idleTimeout, boolean threadLocalCnxs)
public static Pool configureConnectionPool(AttributesFactory factory, java.lang.String host, int port1, int port2, boolean establish, int redundancy, int connectionsPerServer, java.lang.String serverGroup, int pingInterval)
public static Pool configureConnectionPool(AttributesFactory factory, java.lang.String host, int port1, int port2, boolean establish, int redundancy, int connectionsPerServer, java.lang.String serverGroup)
public static Pool configureConnectionPoolWithName(AttributesFactory factory, java.lang.String host, int[] ports, boolean establish, int redundancy, int connectionsPerServer, java.lang.String serverGroup, java.lang.String poolName)
public static Pool configureConnectionPoolWithName(AttributesFactory factory, java.lang.String host, int[] ports, boolean establish, int redundancy, int connectionsPerServer, java.lang.String serverGroup, java.lang.String poolName, int pingInterval, int idleTimeout, boolean threadLocalCnxs, int lifetimeTimeout, int statisticInterval)
public static Pool configureConnectionPoolWithNameAndFactory(AttributesFactory factory, java.lang.String host, int[] ports, boolean establish, int redundancy, int connectionsPerServer, java.lang.String serverGroup, java.lang.String poolName, PoolFactory pf)
public static Pool configureConnectionPoolWithNameAndFactory(AttributesFactory factory, java.lang.String host, int[] ports, boolean establish, int redundancy, int connectionsPerServer, java.lang.String serverGroup, java.lang.String poolName, PoolFactory pf, int pingInterval, int idleTimeout, boolean threadLocalCnxs, int lifetimeTimeout, int statisticInterval)
public static Pool configureConnectionPool(AttributesFactory factory, java.lang.String host, int[] ports, boolean establish, int redundancy, int connectionsPerServer, java.lang.String serverGroup)
public static Pool configureConnectionPool(AttributesFactory factory, java.lang.String host, int[] ports, boolean establish, int redundancy, int connectionsPerServer, java.lang.String serverGroup, int pingInterval, int idleTimeout, boolean threadLocalCnxs, int lifetimeTimeout)
public static Pool configureConnectionPool(AttributesFactory factory, java.lang.String host, int[] ports, boolean establish, int redundancy, int connectionsPerServer, java.lang.String serverGroup, int pingInterval, int idleTimeout, boolean threadLocalCnxs, int lifetimeTimeout, int statisticInterval)
protected static DistributedMember getMemberId()
public void createBridgeServer(org.apache.geode.test.dunit.VM vm, java.lang.String rName, int port)
vm
- the VM on which to create the serverrName
- the name of the Region to create on the serverport
- the TCP port on which the server should listenpublic static int[] createUniquePorts(int numToCreate)