test
Class EpidemicRouterTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by test.AbstractRouterTest
              extended by test.EpidemicRouterTest
All Implemented Interfaces:
junit.framework.Test

public class EpidemicRouterTest
extends AbstractRouterTest

Tests for EpidemicRouter and, due the simple nature of Epidemic router, also ActiveRouter in general.


Field Summary
 
Fields inherited from class test.AbstractRouterTest
BUFFER_SIZE, c0, clock, disconnectLocation, farAway, h0, h1, h2, h3, h4, h5, h6, mc, msgId1, msgId2, msgId3, msgId4, msgId5, routerProto, TRANSMIT_SPEED, ts, utils
 
Constructor Summary
EpidemicRouterTest()
           
 
Method Summary
 void setUp()
           
 void testAbortWhenReady()
          try disconnecting on the same update interval when a transfer should be finished -> should not cause abort (anymore)
 void testDeliverableMessageExchange()
          Tests that messages that can be delivered right a way are delivered first
 void testDifferentOrdering()
          Test unexpected ordering of finalizations and message transfers.
 void testDoubleDelivery()
          Tests if rejecting already delivered message(s) work
 void testFifoSendingQ()
           
 void testManyMessages()
          Checks that delivering many messages in a row works
 void testMessageRelayAbort()
          Tests aborting transfer when connections is disconnected during the transfer
 void testNewMessageToFullBufferWhileTransferring()
          Tests creating a new message when the message buffer is full and the message that should be removed is the message being sent
 void testQueueManagement()
          Tests if the FIFO queue management works
 void testRandomSendingQ()
           
 void testResponse()
           
 void testRouter()
          Tests routing messages between three hosts
 void testTtlExpiry()
           
 
Methods inherited from class test.AbstractRouterTest
checkCreates, checkDelivered, checkTransferStart, deliverMessage, disconnect, setRouterProto, toString, updateAllNodes
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown
 
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
 

Constructor Detail

EpidemicRouterTest

public EpidemicRouterTest()
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Overrides:
setUp in class AbstractRouterTest
Throws:
java.lang.Exception

testRouter

public void testRouter()
Tests routing messages between three hosts


testManyMessages

public void testManyMessages()
Checks that delivering many messages in a row works


testDeliverableMessageExchange

public void testDeliverableMessageExchange()
Tests that messages that can be delivered right a way are delivered first


testMessageRelayAbort

public void testMessageRelayAbort()
Tests aborting transfer when connections is disconnected during the transfer


testAbortWhenReady

public void testAbortWhenReady()
try disconnecting on the same update interval when a transfer should be finished -> should not cause abort (anymore)


testDifferentOrdering

public void testDifferentOrdering()
Test unexpected ordering of finalizations and message transfers.


testDoubleDelivery

public void testDoubleDelivery()
Tests if rejecting already delivered message(s) work


testQueueManagement

public void testQueueManagement()
Tests if the FIFO queue management works


testNewMessageToFullBufferWhileTransferring

public void testNewMessageToFullBufferWhileTransferring()
Tests creating a new message when the message buffer is full and the message that should be removed is the message being sent


testTtlExpiry

public void testTtlExpiry()

testResponse

public void testResponse()

testFifoSendingQ

public void testFifoSendingQ()
                      throws java.lang.Exception
Throws:
java.lang.Exception

testRandomSendingQ

public void testRandomSendingQ()
                        throws java.lang.Exception
Throws:
java.lang.Exception