org.apache.qpid.testkit
Class TestLauncher
java.lang.Object
org.apache.qpid.testkit.TestLauncher
- All Implemented Interfaces:
- ErrorHandler
- Direct Known Subclasses:
- ResourceLeakTest
public class TestLauncher
- extends Object
- implements ErrorHandler
A basic test case class that could launch a Sender/Receiver
or both, each on it's own separate thread.
If con_count == ssn_count, then each entity created will have
it's own Connection. Else if con_count < ssn_count, then
a connection will be shared by ssn_count/con_count # of entities.
The if both sender and receiver options are set, it will
share a connection.
The following options are available as jvm args
host, port
con_count,ssn_count
con_idle_time - which determines heartbeat
sender, receiver - booleans which indicate which entity to create.
Setting them both is also a valid option.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
host
protected String host
port
protected int port
sessions_per_con
protected int sessions_per_con
connection_count
protected int connection_count
heartbeat
protected long heartbeat
sender
protected boolean sender
receiver
protected boolean receiver
useUniqueDests
protected boolean useUniqueDests
url
protected String url
address
protected String address
durable
protected boolean durable
failover
protected String failover
controlCon
protected org.apache.qpid.client.AMQConnection controlCon
controlDest
protected Destination controlDest
controlSession
protected Session controlSession
statusSender
protected MessageProducer statusSender
clients
protected List<org.apache.qpid.client.AMQConnection> clients
df
protected DateFormat df
nf
protected NumberFormat nf
testName
protected String testName
TestLauncher
public TestLauncher()
configureLogging
protected void configureLogging()
setUpControlChannel
public void setUpControlChannel()
cleanup
public void cleanup()
start
public void start(String addr)
createReceiver
protected void createReceiver(String index,
org.apache.qpid.client.AMQConnection con,
String addr,
ErrorHandler h)
createSender
protected void createSender(String index,
org.apache.qpid.client.AMQConnection con,
String addr,
ErrorHandler h)
handleError
public void handleError(String msg,
Exception e)
- Specified by:
handleError
in interface ErrorHandler
main
public static void main(String[] args)
Licensed to the Apache Software Foundation