|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.qpid.junit.extensions.AsymptoticTestCase
org.apache.qpid.ping.PingTestPerf
public class PingTestPerf
PingTestPerf is a ping test, that has been written with the intention of being scaled up to run many times simultaneously to simluate many clients/producers/connections.
A single run of the test using the default JUnit test runner will result in the sending and timing of a single full round trip ping. This test may be scaled up using a suitable JUnit test runner. The setup/teardown cycle establishes a connection to a broker and sets up a queue to send ping messages to and a temporary queue for replies. This setup is only established once for all the test repeats/threads that may be run, except if the connection is lost in which case an attempt to re-establish the setup is made. The test cycle is: Connects to a queue, creates a temporary queue, creates messages containing a property that is the name of the temporary queue, fires off a message on the original queue and waits for a response on the temporary queue. Configurable test properties: message size, transacted or not, persistent or not. Broker connection details.Responsibilities | Collaborations |
---|
Nested Class Summary | |
---|---|
protected static class |
PingTestPerf.PerThreadSetup
|
Field Summary | |
---|---|
protected org.apache.qpid.junit.extensions.util.ParsedProperties |
testParameters
Holds a property reader to extract the test parameters from. |
(package private) ThreadLocal<PingTestPerf.PerThreadSetup> |
threadSetup
Thread local to hold the per-thread test setup fields. |
Constructor Summary | |
---|---|
PingTestPerf(String name)
|
Method Summary | |
---|---|
void |
postThreadSetUp()
Called after all threads have completed their setup. |
static junit.framework.Test |
suite()
Compile all the tests into a test suite. |
void |
testPingOk(int numPings)
|
void |
threadSetUp()
Performs test fixture creation on a per thread basis. |
void |
threadTearDown()
Performs test fixture clean |
Methods inherited from class org.apache.qpid.junit.extensions.AsymptoticTestCase |
---|
getN, getTestEndMemory, getTestStartMemory, getTestTime, reset, runTest, setN |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface junit.framework.Test |
---|
countTestCases, run |
Field Detail |
---|
ThreadLocal<PingTestPerf.PerThreadSetup> threadSetup
protected org.apache.qpid.junit.extensions.util.ParsedProperties testParameters
Constructor Detail |
---|
public PingTestPerf(String name)
Method Detail |
---|
public static junit.framework.Test suite()
public void testPingOk(int numPings) throws Exception
Exception
public void threadSetUp()
threadSetUp
in interface org.apache.qpid.junit.extensions.TestThreadAware
public void postThreadSetUp()
postThreadSetUp
in interface org.apache.qpid.junit.extensions.TestThreadAware
public void threadTearDown()
threadTearDown
in interface org.apache.qpid.junit.extensions.TestThreadAware
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |