org.apache.qpid.testkit
Class TestLauncher

java.lang.Object
  extended by 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.


Field Summary
protected  String address
           
protected  List<org.apache.qpid.client.AMQConnection> clients
           
protected  int connection_count
           
protected  org.apache.qpid.client.AMQConnection controlCon
           
protected  Destination controlDest
           
protected  Session controlSession
           
protected  DateFormat df
           
protected  boolean durable
           
protected  String failover
           
protected  long heartbeat
           
protected  String host
           
protected  NumberFormat nf
           
protected  int port
           
protected  boolean receiver
           
protected  boolean sender
           
protected  int sessions_per_con
           
protected  MessageProducer statusSender
           
protected  String testName
           
protected  String url
           
protected  boolean useUniqueDests
           
 
Constructor Summary
TestLauncher()
           
 
Method Summary
 void cleanup()
           
protected  void configureLogging()
           
protected  void createReceiver(String index, org.apache.qpid.client.AMQConnection con, String addr, ErrorHandler h)
           
protected  void createSender(String index, org.apache.qpid.client.AMQConnection con, String addr, ErrorHandler h)
           
 void handleError(String msg, Exception e)
           
static void main(String[] args)
           
 void setUpControlChannel()
           
 void start(String addr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

TestLauncher

public TestLauncher()
Method Detail

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