public class CacheXml30Test extends CacheTestCase
Cache is created. The
fact that it is a subclass of RegionTestCase allows us to
take advantage of methods like CacheTestCase.getCache().
Note that this class only tests the XML syntax allowed in GemFire 3.X (3.0, 3.2, 3.5). Tests for syntax added in subsequent releases is tested by subclasses of this class.
| Modifier and Type | Class and Description |
|---|---|
static class |
CacheXml30Test.CacheLoaderWithDeclarables
A
CacheLoader that is Declarable and
has some interesting parameters. |
static class |
CacheXml30Test.EvictionObjectSizer |
static class |
CacheXml30Test.ExceptionalCacheListener
A cache listener whose constructor throws an exception
|
static class |
CacheXml30Test.MyTestCacheListener
A
CacheListener that is
Declarable, but not Declarable2. |
static class |
CacheXml30Test.MyTestCacheWriter
A
CacheWriter that is
Declarable, but not Declarable2. |
static class |
CacheXml30Test.MyTestTransactionListener
A
TransactionListener that is
Declarable, but not Declarable2. |
static class |
CacheXml30Test.NotDeclarableCacheListener
A cache listener that is not
Declarable |
static class |
CacheXml30Test.TestBridgeClient |
static class |
CacheXml30Test.TestDeclarable |
static class |
CacheXml30Test.TestException |
DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2cachelogPerTest, reconnect, system, testName| Constructor and Description |
|---|
CacheXml30Test(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected File |
findFile(String fileName)
Finds an XML file with the given name.
|
Properties |
getDistributedSystemProperties()
Returns a
Properties object used to configure a
connection to a DistributedSystem. |
protected String |
getGemFireVersion()
The version of GemFire tested by this class.
|
void |
setUp()
Sets up the test (noop).
|
protected void |
setXmlFile(File xmlFile)
Sets the file used by this test to initialize the cache
|
void |
tearDown2()
Tears down the test.
|
void |
testAttributesUnordered()
Tests whether or not XML attributes can appear in any order.
|
void |
testBadFloat()
Tests parsing an XML file with a bad float
|
void |
testBadInt()
Tests parsing an XML file with a bad integer
|
void |
testBadKeyConstraintClass()
Tests parsing an XML file with a non-existent key constraint
class.
|
void |
testBadScope()
Tests parsing an XML file with a bad scope.
|
void |
testBridgeClientAsLoader()
Tests a bridge client and special setCacheWriter behavior on
region attributes
|
void |
testBridgeClientAsWriter()
Tests a bridge client and special setCacheWriter behavior on
region attributes
|
void |
testBridgeClientLoaderOverride()
Tests a bridge client and special setCacheLoader over-ride behavior on
region attributes
|
void |
testBridgeClientWriterOverride()
Tests a bridge client and special setCacheWriter over-ride behavior on
region attributes
|
void |
testCacheListener()
Tests a cache listener with no parameters
|
void |
testCacheLoaderWithDeclarables()
Tests a cache loader an interesting combination of declarables
|
void |
testCacheWriter()
Tests a cache writer with no parameters
|
void |
testCallbackNotDeclarable()
Tests parsing an XML file that specifies a cache listener that is
not
Declarable. |
void |
testCallbackWithException()
Tests parsing an XML file that specifies a cache listener whose
constructor throws an exception.
|
void |
testConstrainedKeys()
Tests creating a cache whose keys are constrained
|
void |
testDefaultCache()
Tests creating a cache with the default lock-timeout, lock-lease,
and search-timeout.
|
void |
testDiskDirs()
Tests disk directories
|
void |
testDiskWriteAttributes()
Tests
DiskWriteAttributes |
void |
testEntriesInRootRegion()
Tests creating a cache with entries defined in the root region
|
void |
testEvictionLRUEntryAttributes() |
void |
testEvictionLRUHeapAttributes() |
void |
testEvictionLRUMemoryAttributes() |
void |
testExampleCacheXmlFile()
Tests to make sure that the example cache.xml file in the API
documentation conforms to the DTD.
|
void |
testExpirationAttriubutes()
Tests creating a cache with a various
ExpirationAttributes. |
void |
testLoaderNotLoader()
Tests parsing an XML file that specifies a cache listener that is
not a
CacheLoader. |
void |
testMalformed()
Tests parsing a malformed XML file
|
void |
testNestedRegions()
Tests nested regions
|
void |
testNonDefaultCache()
Tests creating a cache with non-default lock-timeout, lock-lease,
and search-timeout.
|
void |
testNonDefaultRegionAttributes()
Tests a region with non-default region attributes
|
void |
testNonExistentFile()
Tests creating a cache with a non-existent XML file
|
void |
testOverflowAndBackup()
Tests the
overflowThreshold and
persistBackup related attributes |
protected void |
testXml(com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation creation)
Uses the
CacheXmlGenerator to generate an XML file from
the given CacheCreation. |
protected void |
testXml(com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation creation,
boolean checkSame) |
void |
testXmlFileIsDirectory()
Tests creating a cache with a XML file that is a directory
|
addExceptionTag1, basicGetCache, beginCacheXml, cleanDiskDirs, closeAllCache, closeCache, createLonerCache, createMcastCache, createMcastCache, createRegion, createRegion, createRootRegion, createRootRegion, disconnectFromDS, finishCacheXml, finishCacheXml, getCache, getCache, getCache, getCache, getClientCache, getDiskDirs, getGemfireCache, getInternalRegionArguments, getRootRegion, getRootRegion, hasCache, remoteTearDown, removeExceptionTag1, sendSerialMessageToAll, sendUnorderedMessageToAlladdExpectedException, addExpectedException, addHydraProperties, attachDebugger, checkBBFlag, cleanupAllVms, clearBBFlag, crashDistributedSystem, crashDistributedSystem, createLogWriter, disconnectAllFromDS, dumpAllStacks, dumpMyThreads, dumpStack, dumpStack, dumpStack, dumpStackTrace, fail, getAllDistributedSystemProperties, 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, toStringpublic CacheXml30Test(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 CacheTestCaseExceptionprotected String getGemFireVersion()
CacheXml.VERSION_3_0protected void setXmlFile(File xmlFile)
protected File findFile(String fileName)
public Properties getDistributedSystemProperties()
DistributedTestCaseProperties object used to configure a
connection to a DistributedSystem.
Unless overridden, this method will return an empty
Properties object.getDistributedSystemProperties in class DistributedTestCaseprotected void testXml(com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation creation)
CacheXmlGenerator to generate an XML file from
the given CacheCreation. It then creates a Cache
from the XML and asserts that it is the same as the cache
described in the CacheCreation.protected void testXml(com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation creation,
boolean checkSame)
public void testNonExistentFile()
throws IOException
IOExceptionpublic void testXmlFileIsDirectory()
public void testDefaultCache()
public void testNonDefaultCache()
public void testEntriesInRootRegion()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testConstrainedKeys()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testExpirationAttriubutes()
throws com.gemstone.gemfire.cache.CacheException
ExpirationAttributes.com.gemstone.gemfire.cache.CacheExceptionpublic void testCacheLoaderWithDeclarables()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testBridgeClientAsLoader()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testBridgeClientWriterOverride()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testBridgeClientLoaderOverride()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testBridgeClientAsWriter()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testCacheWriter()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testCacheListener()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testNonDefaultRegionAttributes()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testMalformed()
public void testBadInt()
public void testBadFloat()
public void testBadScope()
public void testBadKeyConstraintClass()
public void testCallbackNotDeclarable()
Declarable.public void testCallbackWithException()
public void testLoaderNotLoader()
CacheLoader.public void testNestedRegions()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testAttributesUnordered()
public void testDiskDirs()
throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic void testOverflowAndBackup()
throws com.gemstone.gemfire.cache.CacheException
overflowThreshold and
persistBackup related attributescom.gemstone.gemfire.cache.CacheExceptionpublic void testDiskWriteAttributes()
throws com.gemstone.gemfire.cache.CacheException
DiskWriteAttributescom.gemstone.gemfire.cache.CacheExceptionpublic void testExampleCacheXmlFile()
throws Exception
Exceptionpublic void testEvictionLRUEntryAttributes()
throws Exception
Exceptionpublic void testEvictionLRUMemoryAttributes()
throws Exception
ExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.