|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
JUnit class to test QueueIOPipe. More...

Classes | |
| class | Collector |
| A listener that collects received messages. More... | |
Public Member Functions | |
| QueueIOPipeTest (String name, boolean measureTime) | |
| Constructor. | |
| void | setUp () throws Exception |
| void | tearDown () |
| void | test2QueuesInSeries () throws InterruptedException |
| This test connects two queues in series using a QueueIOPipe. | |
| void | test2QueuesInSeriesSerialized () throws InterruptedException |
| This test connects two queues in series using a QueueIOPipe and sends a serialized message. | |
| void | test2QueuesInSeriesMultiple () throws InterruptedException |
| This test connects two queues in series using a QueueIOPipe and sends multiple messages. | |
Static Public Member Functions | |
| static TestSuite | suite () |
Private Attributes | |
| QueueIOPipe | pipe |
| The QueueIOPipe under test. | |
| QueueInputPipeTrivial | toQueue1 |
| Used to send a message to the first queue. | |
| Queue | queue1 |
| The first queue. | |
| Queue | queue2 |
| The second queue. | |
| Collector | collector |
| Listener collecting messages received by queue2. | |
| boolean | measureTime |
| Used as a switch between the normal and the simulated queue. | |
| CentralMailer | mailman |
| The CentralMailer. | |
JUnit class to test QueueIOPipe.
| frodo2.communication.sharedMemory.QueueIOPipeTest.QueueIOPipeTest | ( | String | name, |
| boolean | measureTime ) |
Constructor.
| name | name of the test method |
| measureTime | true when the queue measures time spent |
References measureTime.
Referenced by suite().
| void frodo2.communication.sharedMemory.QueueIOPipeTest.setUp | ( | ) | throws Exception |
|
static |
References QueueIOPipeTest().
Referenced by frodo2.communication.AllTests.suite().

| void frodo2.communication.sharedMemory.QueueIOPipeTest.tearDown | ( | ) |
| void frodo2.communication.sharedMemory.QueueIOPipeTest.test2QueuesInSeries | ( | ) | throws InterruptedException |
This test connects two queues in series using a QueueIOPipe.
| InterruptedException | if interrupted while sleeping |
References frodo2.communication.sharedMemory.QueueIOPipeTest.Collector.getNextMsgTimed(), mailman, frodo2.communication.MessageWrapper.setDestination(), and toQueue1.

| void frodo2.communication.sharedMemory.QueueIOPipeTest.test2QueuesInSeriesMultiple | ( | ) | throws InterruptedException |
This test connects two queues in series using a QueueIOPipe and sends multiple messages.
| InterruptedException | if interrupted while sleeping |
References frodo2.communication.sharedMemory.QueueIOPipeTest.Collector.getNextMsgTimed(), mailman, frodo2.communication.MessageWrapper.setDestination(), frodo2.communication.MessageWrapper.setTime(), and toQueue1.

| void frodo2.communication.sharedMemory.QueueIOPipeTest.test2QueuesInSeriesSerialized | ( | ) | throws InterruptedException |
This test connects two queues in series using a QueueIOPipe and sends a serialized message.
| InterruptedException | if interrupted while sleeping |
References frodo2.communication.MessageSerializedSimple< T extends Serializable >.deserializeRawData(), frodo2.communication.MessageSerializedSimple< T extends Serializable >.getData(), frodo2.communication.sharedMemory.QueueIOPipeTest.Collector.getNextMsgTimed(), frodo2.communication.Message.getType(), mailman, frodo2.communication.MessageWrapper.setDestination(), test2QueuesInSeriesSerialized(), and toQueue1.
Referenced by test2QueuesInSeriesSerialized().

|
private |
Listener collecting messages received by queue2.
|
private |
The CentralMailer.
Referenced by setUp(), tearDown(), test2QueuesInSeries(), test2QueuesInSeriesMultiple(), and test2QueuesInSeriesSerialized().
|
private |
Used as a switch between the normal and the simulated queue.
Referenced by QueueIOPipeTest().
|
private |
The QueueIOPipe under test.
Referenced by setUp().
|
private |
The first queue.
Referenced by setUp(), and tearDown().
|
private |
The second queue.
Referenced by setUp(), and tearDown().
|
private |
Used to send a message to the first queue.
Referenced by setUp(), test2QueuesInSeries(), test2QueuesInSeriesMultiple(), and test2QueuesInSeriesSerialized().