From 0c745d244da73db6e96beb6321e866755430488d Mon Sep 17 00:00:00 2001 From: "Mohit P. Tahiliani" Date: Sun, 28 May 2017 22:15:20 +0200 Subject: [PATCH] traffic-control: Remove duplicate test case in RED test suite --- .../test/red-queue-disc-test-suite.cc | 34 +++---------------- 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/src/traffic-control/test/red-queue-disc-test-suite.cc b/src/traffic-control/test/red-queue-disc-test-suite.cc index d3ebd9b24..8f15ab136 100644 --- a/src/traffic-control/test/red-queue-disc-test-suite.cc +++ b/src/traffic-control/test/red-queue-disc-test-suite.cc @@ -240,7 +240,6 @@ RedQueueDiscTestCase::RunRedTest (StringValue mode) uint32_t test11; uint32_t test12; uint32_t test13; - uint32_t test14; } drop; @@ -427,7 +426,7 @@ RedQueueDiscTestCase::RunRedTest (StringValue mode) NS_TEST_EXPECT_MSG_NE (st.unforcedMark, 0, "There should be some unforced marks"); - // test 11: Original RED with default parameter settings and fixed m_curMaxP + // test 11: RED with default parameter settings, linear drop probability and fixed m_curMaxP queue = CreateObject (); minTh = 30 * modeSize; maxTh = 90 * modeSize; @@ -477,32 +476,7 @@ RedQueueDiscTestCase::RunRedTest (StringValue mode) NS_TEST_EXPECT_MSG_LT (drop.test12, drop.test11, "Test 12 should have less drops due to probability mark than test 11"); - // test 11: RED with Linear drop probability - queue = CreateObject (); - minTh = 30 * modeSize; - maxTh = 90 * modeSize; - NS_TEST_EXPECT_MSG_EQ (queue->SetAttributeFailSafe ("Mode", mode), true, - "Verify that we can actually set the attribute Mode"); - NS_TEST_EXPECT_MSG_EQ (queue->SetAttributeFailSafe ("MinTh", DoubleValue (minTh)), true, - "Verify that we can actually set the attribute MinTh"); - NS_TEST_EXPECT_MSG_EQ (queue->SetAttributeFailSafe ("MaxTh", DoubleValue (maxTh)), true, - "Verify that we can actually set the attribute MaxTh"); - NS_TEST_EXPECT_MSG_EQ (queue->SetAttributeFailSafe ("QueueLimit", UintegerValue (qSize)), true, - "Verify that we can actually set the attribute QueueLimit"); - NS_TEST_EXPECT_MSG_EQ (queue->SetAttributeFailSafe ("QW", DoubleValue (0.002)), true, - "Verify that we can actually set the attribute QW"); - NS_TEST_EXPECT_MSG_EQ (queue->SetAttributeFailSafe ("LInterm", DoubleValue (2)), true, - "Verify that we can actually set the attribute LInterm"); - NS_TEST_EXPECT_MSG_EQ (queue->SetAttributeFailSafe ("Gentle", BooleanValue (true)), true, - "Verify that we can actually set the attribute Gentle"); - queue->Initialize (); - Enqueue (queue, pktSize, 300, false); - st = StaticCast (queue)->GetStats (); - drop.test13 = st.unforcedDrop; - NS_TEST_EXPECT_MSG_NE (drop.test13, 0, "There should some dropped packets due to probability mark"); - - - // test 14: RED with Nonlinear drop probability + // test 13: RED with Nonlinear drop probability queue = CreateObject (); minTh = 30 * modeSize; maxTh = 90 * modeSize; @@ -525,8 +499,8 @@ RedQueueDiscTestCase::RunRedTest (StringValue mode) queue->Initialize (); Enqueue (queue, pktSize, 300, false); st = StaticCast (queue)->GetStats (); - drop.test14 = st.unforcedDrop; - NS_TEST_EXPECT_MSG_LT (drop.test14, drop.test13, "Test 14 should have less drops due to probability mark than test 13"); + drop.test13 = st.unforcedDrop; + NS_TEST_EXPECT_MSG_LT (drop.test13, drop.test11, "Test 13 should have less drops due to probability mark than test 11"); }