|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectParkNPark.tests.RunOne
public class RunOne
Class that runs one test configuration
Field Summary | |
---|---|
protected Set<String> |
allClients
All clients that are defined, because we need to kill them all on startup |
protected Set<String> |
allServers
All servers that are defined, because we need to kill them all on startup |
protected Set<ProcessInfo> |
clients
Our clients |
protected int |
detectionTimeout
The wait timeout to use during fault detections |
protected boolean |
faultInjection
Whether or not fault injection is enabled |
protected int |
faultInjectionMaxDelay
The maximum delay of the fault injection in milliseconds |
protected int |
faultInjectionMinDelay
The minimum delay of the fault injection in milliseconds |
protected int |
getLotsModeCount
When not 0, how many invocations of getLotsMode should be performed |
protected int |
interRequestTime
Time between requests |
private String |
jdbcPassword
The JDBC password |
private String |
jdbcURL
The JDBC URL |
private String |
jdbcUsername
The JDBC user name |
protected boolean |
killOnly
When true, the testing manager will only kill everything |
protected ORB |
orb
Object request broker |
protected static ProcessInfoComparator<ProcessInfo> |
processInfoComparator
Singleton instance of the ProcessInfoComparator |
protected String |
projectRoot
The project root folder |
protected int |
recoveryTimeout
The wait timeout to use during fault recoveries |
protected int |
replySize
Size of reply |
protected ProcessInfo |
sacredServer
Our name and replication server |
protected Set<ProcessInfo> |
servers
Our servers |
protected BufferedWriter |
stdErrWriter
A writer for stderr |
Constructor Summary | |
---|---|
RunOne(String projectRoot,
int numClients,
int numServers,
int interRequestTime,
int replySize,
boolean faultInjection,
int faultInjectionMinDelay,
int faultInjectionMaxDelay,
boolean killOnly,
int getLotsMode,
int detectionTimeout,
int recoveryTimeout,
String jdbcURL,
String jdbcUsername,
String jdbcPassword)
Creates a new test case runner |
Method Summary | |
---|---|
protected void |
ensureOutputFoldersExist()
Ensures that the output folders exist, which the programs write stdout or stderr to, depending on the program |
static void |
main(String[] args)
Run the tests as specified on the command line |
protected static void |
populateSet(Set<String> set,
Reader input)
Populates a Set from individual lines of a reader |
void |
run()
Runs this test's configuration by cleaning out any old server instances, starting the name service from scratch, starting the replication manager, starting the servers, starting the clients, waiting for the clients to exit, telling the servers to exit, and waiting for the servers to exit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int interRequestTime
protected int replySize
protected static final ProcessInfoComparator<ProcessInfo> processInfoComparator
protected Set<ProcessInfo> servers
protected Set<String> allServers
protected Set<ProcessInfo> clients
protected Set<String> allClients
protected ProcessInfo sacredServer
protected String projectRoot
protected boolean faultInjection
protected int faultInjectionMinDelay
protected int faultInjectionMaxDelay
protected boolean killOnly
protected int getLotsModeCount
protected int recoveryTimeout
protected int detectionTimeout
protected ORB orb
private String jdbcURL
private String jdbcUsername
private String jdbcPassword
protected BufferedWriter stdErrWriter
Constructor Detail |
---|
public RunOne(String projectRoot, int numClients, int numServers, int interRequestTime, int replySize, boolean faultInjection, int faultInjectionMinDelay, int faultInjectionMaxDelay, boolean killOnly, int getLotsMode, int detectionTimeout, int recoveryTimeout, String jdbcURL, String jdbcUsername, String jdbcPassword) throws IOException
projectRoot
- The project's root folder to use for this test case runnumClients
- The number of clients to use in this test case runnumServers
- The number of servers to use in this test case runinterRequestTime
- The amount of time in milliseconds to wait between client invocationsreplySize
- The size of the replies from the server in bytesfaultInjection
- True if fault injection is enabled or
false if it is disabledfaultInjectionMinDelay
- The minimum delay of the fault injector in millisecondsfaultInjectionMaxDelay
- The maximum delay of the fault injector in millisecondsgetLotsMode
- When not zero, this is the number of iterations to run in getLotsMode
on the client. When zero or less, the client is run with the predefined test suitedetectionTimeout
- The fault detection timeout value to pass to the replication
managerrecoveryTimeout
- The fault recovery timeout value to pass to clientsjdbcURL
- The JDBC URL to use in the database connectionjdbcUsername
- The username to use in the database connectionjdbcPassword
- The password to use in the database connection
IOException
- Thrown if an IOException is thrown during the processingMethod Detail |
---|
public static void main(String[] args)
args
- The command line argumentsprotected static void populateSet(Set<String> set, Reader input) throws IOException
set
- The Set to populateinput
- The Reader to read lines from
IOException
- Thrown if an IOException arises during processingprotected void ensureOutputFoldersExist()
public void run()
run
in interface Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |