FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.varOrdering.election.tests.VarElectionMessengerTest Class Reference

JUnit test for the class VarElectionMEssengerTest. More...

Inheritance diagram for frodo2.algorithms.varOrdering.election.tests.VarElectionMessengerTest:

Classes

class  IdIncreasingVerifyer
 A IncomingMsgPolicyInterface used in JUNIT VarElectionMessengerTest to test whenever ID send are strictly increasing. More...

Public Member Functions

 VarElectionMessengerTest (String method)
 Constructor that instantiates a test only for the input method.
Public Member Functions inherited from frodo2.algorithms.varOrdering.election.tests.LeaderElectionMaxIDTest< Integer >
 LeaderElectionMaxIDTest (String method)
 Constructor that instantiates a test only for the input method.
void testRandomSharedMemory () throws IOException
 Tests the DFS generation protocol on a random graph using QueueIOPipes.
void testRandomTCP () throws IOException
 Tests the DFS generation protocol on a random graph using TCP pipes.
void testRandom (boolean useTCP) throws IOException
 Tests the leader election protocol on a random graph of "agents".
Collection< MessageTypegetMsgTypes ()
void notifyIn (Message msg)
 Keeps track of the output of the leader election protocol sent by each agent.
void setQueue (Queue queue)
 Does nothing in this case.

Static Public Member Functions

static TestSuite suite ()
Static Public Member Functions inherited from frodo2.algorithms.varOrdering.election.tests.LeaderElectionMaxIDTest< Integer >
static TestSuite suite ()
static Map< String, String > computeLeaders (List< String > nodes, List< List< String > > components)
 Compute the leaders.

Protected Member Functions

int getNbrMsgsNeeded ()
Map< String, Integer > initiatingIDandListener ()
void checkOutputs (Map< String, Integer > allUniqueIDs)
Protected Member Functions inherited from frodo2.algorithms.varOrdering.election.tests.LeaderElectionMaxIDTest< Integer >
void setUp ()
void tearDown () throws Exception
 Ends all queues.
Map< String, S > initiatingIDandListener ()
 Compute uniqueID, link them with variable name and generate listeners.
void checkOutputs (Map< String, S > allUniqueIDs)
 Called to verify output correctness.
int getNbrMsgsNeeded ()

Additional Inherited Members

Protected Attributes inherited from frodo2.algorithms.varOrdering.election.tests.LeaderElectionMaxIDTest< Integer >
int nbrAgents
 Number of agents in the test.
Map< String, Queuequeues
 List of queues, indexed by agent name.
Map< String, MessageLEoutput< String > > outputs
 For each agent, the output of LeaderElectionMaxID.
Integer remainingOutputs
 Current number of agents that still need to their output of the leader election protocol.
final ReentrantLock finished_lock
 Used to make the test thread wait.
final Condition finished
 Used to wake up the test thread when all agents have finished.
RandGraphFactory.Graph graph
 Random graph used to generate a constraint graph.
Map< String, QueueOutputPipeInterfacepipes
 One output pipe used to send messages to each queue, indexed by the queue's agent name.

Detailed Description

JUnit test for the class VarElectionMEssengerTest.

Constructor & Destructor Documentation

◆ VarElectionMessengerTest()

frodo2.algorithms.varOrdering.election.tests.VarElectionMessengerTest.VarElectionMessengerTest ( String method)

Constructor that instantiates a test only for the input method.

Parameters
methodtest method

Referenced by suite().

Member Function Documentation

◆ checkOutputs()

◆ getNbrMsgsNeeded()

int frodo2.algorithms.varOrdering.election.tests.VarElectionMessengerTest.getNbrMsgsNeeded ( )
protected

◆ initiatingIDandListener()

◆ suite()

TestSuite frodo2.algorithms.varOrdering.election.tests.VarElectionMessengerTest.suite ( )
static
Returns
the test suite for this test

References VarElectionMessengerTest().

Referenced by frodo2.algorithms.varOrdering.election.tests.AllTestsElection.suite().

Here is the call graph for this function:

The documentation for this class was generated from the following file: