public class SustainabilityTest
extends java.lang.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(java.lang.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(java.lang.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,
java.io.IOException
com.gemstone.gemfire.cache.TimeoutExceptioncom.gemstone.gemfire.cache.CacheWriterExceptioncom.gemstone.gemfire.cache.CacheExistsExceptioncom.gemstone.gemfire.cache.RegionExistsExceptionjava.io.IOExceptionpublic static void generateXmlWithMultiRequiredRoles()
throws java.lang.Exception
Exception.java.lang.Exceptionpublic static void generateXml(com.gemstone.gemfire.cache.Cache cache)
throws java.lang.Exception
java.lang.Exceptionpublic static void generateABRegionRequiredXml()
throws java.lang.Exception
java.lang.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 java.lang.Exception
java.lang.Exceptionpublic static void createSelfRolePlayingVm()
throws java.lang.Exception
java.lang.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 java.lang.Exception
java.lang.Exceptionpublic static void createCacheAndRegionsWithBackUp()
throws java.lang.Exception
Exception.java.lang.Exceptionpublic static void createCacheRequiresABFromXML()
throws java.lang.Exception
java.lang.Exceptionpublic static void validateCacheCreation()
throws java.lang.Exception
java.lang.Exceptionpublic static void createMultiRegionRequireRoles()
public static void validateSelfRolePlayerClient()
throws java.lang.Exception
java.lang.Exceptionpublic static void checkGetInitialImageStats()
throws java.lang.Exception
java.lang.Exceptionpublic static void putRegionA()
throws java.lang.Exception
Exception.java.lang.Exceptionpublic static void putRegionB()
throws java.lang.Exception
Exception.java.lang.Exceptionpublic static void putKeysValuesRegionA()
throws java.lang.Exception
java.lang.Exceptionpublic static void putKeysValuesRegionB()
throws java.lang.Exception
java.lang.Exceptionpublic static void putKeysValuesRegionC()
throws java.lang.Exception
java.lang.Exceptionpublic static void putKeysValuesRegionD()
throws java.lang.Exception
java.lang.Exceptionpublic static void putKeysValuesRegionE()
throws java.lang.Exception
java.lang.Exceptionpublic static void putKeysValuesRegionF()
throws java.lang.Exception
java.lang.Exceptionpublic static void putKeysValuesRegionG()
throws java.lang.Exception
java.lang.Exceptionpublic static void putKeysValues(com.gemstone.gemfire.cache.Region theRegion)
throws java.lang.Exception
region - Regionjava.lang.Exceptionpublic static void stopOtherClients()
throws ClientVmNotFoundException
java.lang.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,
java.lang.Exception
ClientVmNotFoundExceptionjava.lang.Exceptionpublic static void stopClient(java.lang.String theClient)
throws ClientVmNotFoundException
ClientVmNotFoundExceptionpublic static void startClient(java.lang.String theClient)
public static void printRegions()
throws java.lang.Exception
java.lang.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.