public class SustainabilityTest extends Object
| Constructor and Description |
|---|
SustainabilityTest() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkGetInitialImageStats()
Checks the integrity of all the regions by making sure there are
seven regions defined and all the regions have 20000 key-value pair.
|
static void |
createCacheAndRegionsWithBackUp()
Creates the cache from the xml file specified by xmlFileName.
|
static void |
createCacheAndRegionsWithRoleLoss()
Creates a cache from an xml file specified by xmlFileName
expected to lose a required role.
|
static void |
createCacheRequiresABFromXML()
Creates a cache from a cache xml file specified by xmlFileNameRequireAB
variable.
|
static void |
createMultiRegionRequireRoles()
Creats the cache from the xml file specified by xmlFileName parameter.
|
static void |
createRolePlayerAVm()
Creats a vm playing a role "rolePlayerA".
|
static void |
createRolePlayerBVm()
Creats a vm playing a role "rolePlayerB".
|
static void |
createRolePlayerCVm()
Creats a vm playing a role "rolePlayerC".
|
static void |
createRolePlayerDVm()
Creats a vm playing a role "rolePlayerD".
|
static void |
createRolePlayerEVm()
Creats a vm playing a role "rolePlayerE".
|
static void |
createRolePlayerFVm()
Creats a vm playing a role "rolePlayerF".
|
static void |
createRolePlayerGVm()
Creats a vm playing a role "rolePlayerG".
|
static void |
createRolePlayerVm()
Creates a cache playing the role of "rolePlayer" defined by hydra.GemFirePrms-roles
property defined in reconnectRoleLossBackUP.conf.
|
static void |
createSelfRolePlayingVm()
Create a cache which playes the role of "rolePlayerA" which is required
by the region created in this cache.
|
static void |
createSingleRegionRequiresRoleAB() |
static void |
doSomeThing()
Keeps the vm alive for hydra.
|
static void |
generateABRegionRequiredXml()
Generates the xml file used when the vm reconnects and throws exception
when not able to generate xml file.
|
static void |
generateXml()
Generates an xml file with a region and required role.
|
static void |
generateXml(com.gemstone.gemfire.cache.Cache cache) |
static void |
generateXmlWithMultiRequiredRoles()
Generates an xml file with mutiple regions with required roles.
|
static void |
printRegions()
Prints all the root regions in the cache.
|
static void |
putKeysValues(com.gemstone.gemfire.cache.Region theRegion)
Puts 20000 keys value for the region passed as parameter to
the method.
|
static void |
putKeysValuesRegionA()
Puts multiple keys value pair in RegionA.
|
static void |
putKeysValuesRegionB()
Puts multiple keys value pair in RegionB.
|
static void |
putKeysValuesRegionC()
Puts multiple keys value pair in RegionC.
|
static void |
putKeysValuesRegionD()
Puts multiple keys value pair in RegionD.
|
static void |
putKeysValuesRegionE()
Puts multiple keys value pair in RegionE.
|
static void |
putKeysValuesRegionF()
Puts multiple keys value pair in RegionF.
|
static void |
putKeysValuesRegionG()
Puts multiple keys value pair in RegionG.
|
static void |
putRegionA()
Puts some key value pair in regionA.
|
static void |
putRegionB()
Puts some keys value in regionB.
|
static void |
startClient() |
static void |
startClient(String theClient) |
static void |
stopAndRestartRandomRolePlayingClients()
Stops and restarts a random client from a vector of clients
configured in the conf file by "roles.RolesPrms-clientsToStop"
property.
|
static void |
stopClient()
Stops a client specified by the roles.RolesPrms-clientsToStop parameter.
|
static void |
stopClient(String theClient)
Stops a particular client specified by the parameter.
|
static void |
stopOtherClients()
Stops and restarts a client vm.
|
static void |
validateCacheCreation()
Validates the cache creation and regions after it reconnects properly
to the distributed system.
|
static void |
validateSelfRolePlayerClient()
Validates the integrity of the region defined in the cache playing
the role required by the region.
|
public static void generateXml()
throws com.gemstone.gemfire.cache.TimeoutException,
com.gemstone.gemfire.cache.CacheWriterException,
com.gemstone.gemfire.cache.CacheExistsException,
com.gemstone.gemfire.cache.RegionExistsException,
IOException
com.gemstone.gemfire.cache.TimeoutExceptioncom.gemstone.gemfire.cache.CacheWriterExceptioncom.gemstone.gemfire.cache.CacheExistsExceptioncom.gemstone.gemfire.cache.RegionExistsExceptionIOExceptionpublic static void generateXmlWithMultiRequiredRoles()
throws Exception
Exception.Exceptionpublic static void generateXml(com.gemstone.gemfire.cache.Cache cache)
throws Exception
Exceptionpublic static void generateABRegionRequiredXml()
throws Exception
Exceptionpublic static void createRolePlayerVm()
throws com.gemstone.gemfire.cache.TimeoutException,
com.gemstone.gemfire.cache.CacheWriterException,
com.gemstone.gemfire.cache.CacheExistsException,
com.gemstone.gemfire.cache.RegionExistsException
com.gemstone.gemfire.cache.TimeoutExceptioncom.gemstone.gemfire.cache.CacheWriterExceptioncom.gemstone.gemfire.cache.CacheExistsExceptioncom.gemstone.gemfire.cache.RegionExistsExceptionpublic static void createSingleRegionRequiresRoleAB()
throws Exception
Exceptionpublic static void createSelfRolePlayingVm()
throws Exception
Exceptionpublic static void createRolePlayerAVm()
public static void createRolePlayerBVm()
public static void createRolePlayerCVm()
public static void createRolePlayerDVm()
public static void createRolePlayerEVm()
public static void createRolePlayerFVm()
public static void createRolePlayerGVm()
public static void createCacheAndRegionsWithRoleLoss()
throws Exception
Exceptionpublic static void createCacheAndRegionsWithBackUp()
throws Exception
Exception.Exceptionpublic static void createCacheRequiresABFromXML()
throws Exception
Exceptionpublic static void validateCacheCreation()
throws Exception
Exceptionpublic static void createMultiRegionRequireRoles()
public static void validateSelfRolePlayerClient()
throws Exception
Exceptionpublic static void checkGetInitialImageStats()
throws Exception
Exceptionpublic static void putRegionA()
throws Exception
Exception.Exceptionpublic static void putRegionB()
throws Exception
Exception.Exceptionpublic static void putKeysValuesRegionA()
throws Exception
Exceptionpublic static void putKeysValuesRegionB()
throws Exception
Exceptionpublic static void putKeysValuesRegionC()
throws Exception
Exceptionpublic static void putKeysValuesRegionD()
throws Exception
Exceptionpublic static void putKeysValuesRegionE()
throws Exception
Exceptionpublic static void putKeysValuesRegionF()
throws Exception
Exceptionpublic static void putKeysValuesRegionG()
throws Exception
Exceptionpublic static void putKeysValues(com.gemstone.gemfire.cache.Region theRegion)
throws Exception
region - RegionExceptionpublic static void stopOtherClients()
throws ClientVmNotFoundException
Exception - /
public static void stopAndRestartClient()throws Exception{
stopClient();
MasterController.sleepForMs(5000);
startClient();
MasterController.sleepForMs(10000);
}
/**
Stops all the clients listed in the roles.RolesPrms-clientsToStop property
from the conf file.ClientVmNotFoundException.ClientVmNotFoundExceptionpublic static void stopAndRestartRandomRolePlayingClients()
throws ClientVmNotFoundException,
Exception
ClientVmNotFoundExceptionExceptionpublic static void stopClient(String theClient) throws ClientVmNotFoundException
ClientVmNotFoundExceptionpublic static void startClient(String theClient)
public static void printRegions()
throws Exception
Exceptionpublic static void stopClient()
throws ClientVmNotFoundException
ClientVmNotFoundExceptionpublic static void startClient()
throws ClientVmNotFoundException
ClientVmNotFoundExceptionpublic static void doSomeThing()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.