|
||||||||||
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
org.apache.qpid.ping.PingAsyncTestPerf
public class PingAsyncTestPerf
PingAsyncTestPerf is a performance test that outputs multiple timings from its test method, using the timing controller
interface supplied by the test runner from a seperate listener thread. It differs from the PingTestPerf
test
that it extends because it can output timings as replies are received, rather than waiting until all expected replies
are received. This is less 'blocky' than the tests in PingTestPerf
, and provides a truer simulation of sending
and recieving clients working asynchronously.
Responsibilities | Collaborations |
---|---|
Send many ping messages and output timings asynchronously on batches received. |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.qpid.ping.PingTestPerf |
---|
PingTestPerf.PerThreadSetup |
Field Summary | |
---|---|
static int |
TEST_RESULTS_BATCH_SIZE_DEFAULT
Holds the default test results logging batch size. |
static String |
TEST_RESULTS_BATCH_SIZE_PROPNAME
Holds the name of the property to get the test results logging batch size. |
Fields inherited from class org.apache.qpid.ping.PingTestPerf |
---|
testParameters, threadSetup |
Constructor Summary | |
---|---|
PingAsyncTestPerf(String name)
Creates a new asynchronous ping performance test with the specified name. |
Method Summary | |
---|---|
org.apache.qpid.junit.extensions.TimingController |
getTimingController()
Gets the timing controller passed in by the test runner. |
void |
setTimingController(org.apache.qpid.junit.extensions.TimingController timingController)
Accepts a timing controller from the test runner. |
static junit.framework.Test |
suite()
Compile all the tests into a test suite. |
void |
testAsyncPingOk(int numPings)
Sends the specified number of pings, asynchronously outputs timings on every batch boundary, and waits until all replies have been received or a time out occurs before exiting this method. |
void |
threadSetUp()
Performs test fixture creation on a per thread basis. |
Methods inherited from class org.apache.qpid.ping.PingTestPerf |
---|
postThreadSetUp, testPingOk, threadTearDown |
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 |
---|
public static final String TEST_RESULTS_BATCH_SIZE_PROPNAME
public static final int TEST_RESULTS_BATCH_SIZE_DEFAULT
Constructor Detail |
---|
public PingAsyncTestPerf(String name)
name
- The test name.Method Detail |
---|
public static junit.framework.Test suite()
public void setTimingController(org.apache.qpid.junit.extensions.TimingController timingController)
setTimingController
in interface org.apache.qpid.junit.extensions.TimingControllerAware
timingController
- The timing controller to register mutliple timings with.public org.apache.qpid.junit.extensions.TimingController getTimingController()
public void testAsyncPingOk(int numPings) throws Exception
numPings
- The number of pings to send.
Exception
- pass all errors out to the test harnesspublic void threadSetUp()
threadSetUp
in interface org.apache.qpid.junit.extensions.TestThreadAware
threadSetUp
in class PingTestPerf
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |