diff --git a/src/olsr/test/bug780-test.cc b/src/olsr/test/bug780-test.cc index 66acfbbb6..0eb79d9e0 100644 --- a/src/olsr/test/bug780-test.cc +++ b/src/olsr/test/bug780-test.cc @@ -127,7 +127,7 @@ Bug780Test::CreateNodes (void) // Assign 6 streams per Wifi device NS_TEST_ASSERT_MSG_EQ (streamsUsed, (adhocDevices.GetN () * 6), "Stream assignment mismatch"); streamsUsed += wifiChannel.AssignStreams (chan, streamsUsed); - // Assign 0 streams per channel for this configuration + // Assign 0 additional streams per channel for this configuration NS_TEST_ASSERT_MSG_EQ (streamsUsed, (adhocDevices.GetN () * 6), "Stream assignment mismatch"); OlsrHelper olsr; @@ -135,8 +135,12 @@ Bug780Test::CreateNodes (void) InternetStackHelper internet; internet.SetRoutingHelper (olsr); internet.Install (adhocNodes); + // Assign 3 streams per node to internet stack for this configuration + streamsUsed += internet.AssignStreams (adhocNodes, streamsUsed); + NS_TEST_ASSERT_MSG_EQ (streamsUsed, (adhocDevices.GetN () * 6) + (adhocNodes.GetN () * 3), "Stream assignment mismatch"); + // Olsr uses one additional stream per wifi device for this configuration streamsUsed += olsr.AssignStreams (adhocNodes, 0); - NS_TEST_ASSERT_MSG_EQ (streamsUsed, ((adhocDevices.GetN () * 6) + nWifis), "Should have assigned 3 streams"); + NS_TEST_ASSERT_MSG_EQ (streamsUsed, ((adhocDevices.GetN () * 6) + (adhocDevices.GetN () * 3) + nWifis), "Should have assigned 3 streams"); Ipv4AddressHelper addressAdhoc; addressAdhoc.SetBase ("10.1.1.0", "255.255.255.0");