public class InterestResultPolicyDUnitTest extends DistributedTestCase
InterestResultPolicy types.DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2logPerTest, reconnect, system, testName| Constructor and Description |
|---|
InterestResultPolicyDUnitTest(String name)
Creates a test instance with the given name
|
| Modifier and Type | Method and Description |
|---|---|
static void |
closeCache()
Closes the cache instance created and disconnects from the distributed
system.
|
static void |
createClientCache(String host,
Integer port)
Creates the client cache and region.
|
static Integer |
createServerCache()
Creates the cache and starts the server
|
static Object |
getEntryCount()
Gets the total number of keys in the test region
|
static void |
populateServerCache()
Populates the server cache by putting some entries
|
protected void |
realTearDown() |
static void |
registerInterest(Object interestPolicy,
Object totalKeysToRegister)
Registers the test region on client with a keylist containing all keys
pre-populated on server and a given
InterestResultPolicy type. |
void |
setUp()
Creates the server cache and populates it with some entries
|
void |
tearDown2()
Closes the cache on server and client
|
void |
testBug35358()
This test does the following
1)Create client cache and region 2)Call registerInterest with specific keys (having extra keys other than those pre-populated on server cache) and policy:KEYS 3)At the end of registerInterest call, verify that only prepolulated entries are created in the client cache with null values (entries for keys in the keylist which are not on the server should not be created on the client as a result of registerInterest call) |
void |
testPolicyKeys()
This test does the following
1)Create client cache and region 2)Call registerInterest with all keys pre-populated on server and policy:KEYS 3)At the end of registerInterest call, verify that entries are created in the client cache with value null |
void |
testPolicyKeysValues()
This test does the following
1)Create client cache and region 2)Call registerInterest with all keys pre-populated on server and policy:KEYS_VALUES 3)At the end of registerInterest call, verify that all entries are created in the client cache with values |
void |
testPolicyNone()
This test does the following
1)Create client cache and region 2)Call registerInterest with all keys pre-populated on server and policy:NONE 3)At the end of registerInterest call, verify that no entries are created in the client cache |
static void |
verifyResult(Object interestPolicy,
Object totalKeysRegistered)
Verifies the number of entries (including values) created on the test
region at the end of
Region.registerInterest(K) call depending on the
type of InterestResultPolicy registered for the region. |
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, 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, toStringpublic InterestResultPolicyDUnitTest(String name)
name - -
name of test instancepublic void setUp()
throws Exception
setUp in class DistributedTestCaseExceptionpublic void tearDown2()
throws Exception
tearDown2 in class DistributedTestCaseExceptionprotected void realTearDown()
throws Exception
realTearDown in class DistributedTestCaseExceptionpublic void testPolicyNone()
public void testPolicyKeys()
public void testPolicyKeysValues()
public void testBug35358()
public static void closeCache()
public static Integer createServerCache() throws Exception
Exception - -
thrown if any problem occurs in creating server cache or starting
the serverpublic static void populateServerCache()
throws Exception
Exception - -
thrown if any problem occurs while creating entries at server
cachepublic static void createClientCache(String host, Integer port) throws Exception
Exception - -
thrown if any problem occurs in creating cache or regionpublic static void registerInterest(Object interestPolicy, Object totalKeysToRegister)
InterestResultPolicy type.interestPolicy - -
InterestResultPolicy type specified (NONE,KEYS,KEY_VALUES or
DEFAULT)public static void verifyResult(Object interestPolicy, Object totalKeysRegistered)
Region.registerInterest(K) call depending on the
type of InterestResultPolicy registered for the region.interestPolicy - -
InterestResultPolicy registered for the regionpublic static Object getEntryCount()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.