diff --git a/test/unittest/transport/TCPv4Tests.cpp b/test/unittest/transport/TCPv4Tests.cpp index d333e280941..c116cbc00e7 100644 --- a/test/unittest/transport/TCPv4Tests.cpp +++ b/test/unittest/transport/TCPv4Tests.cpp @@ -1909,22 +1909,6 @@ TEST_F(TCPv4Tests, autofill_port) EXPECT_TRUE(transportUnderTest_autofill.configuration()->listening_ports[0] != 0); EXPECT_TRUE(transportUnderTest_autofill.configuration()->listening_ports.size() == 1); - - uint16_t port = 12345; - TCPv4TransportDescriptor test_descriptor_multiple_autofill; - test_descriptor_multiple_autofill.add_listener_port(0); - test_descriptor_multiple_autofill.add_listener_port(port); - test_descriptor_multiple_autofill.add_listener_port(0); - TCPv4Transport transportUnderTest_multiple_autofill(test_descriptor_multiple_autofill); - transportUnderTest_multiple_autofill.init(); - - EXPECT_TRUE(transportUnderTest_multiple_autofill.configuration()->listening_ports[0] != 0); - EXPECT_TRUE(transportUnderTest_multiple_autofill.configuration()->listening_ports[1] == port); - EXPECT_TRUE(transportUnderTest_multiple_autofill.configuration()->listening_ports[2] != 0); - EXPECT_TRUE( - transportUnderTest_multiple_autofill.configuration()->listening_ports[0] != - transportUnderTest_multiple_autofill.configuration()->listening_ports[2]); - EXPECT_TRUE(transportUnderTest_multiple_autofill.configuration()->listening_ports.size() == 3); } // This test verifies server's channel resources mapping keys uniqueness, where keys are clients locators. diff --git a/test/unittest/transport/TCPv6Tests.cpp b/test/unittest/transport/TCPv6Tests.cpp index 1054ecf926c..9f49c591a26 100644 --- a/test/unittest/transport/TCPv6Tests.cpp +++ b/test/unittest/transport/TCPv6Tests.cpp @@ -197,22 +197,6 @@ TEST_F(TCPv6Tests, autofill_port) EXPECT_TRUE(transportUnderTest_autofill.configuration()->listening_ports[0] != 0); EXPECT_TRUE(transportUnderTest_autofill.configuration()->listening_ports.size() == 1); - - uint16_t port = 12345; - TCPv6TransportDescriptor test_descriptor_multiple_autofill; - test_descriptor_multiple_autofill.add_listener_port(0); - test_descriptor_multiple_autofill.add_listener_port(port); - test_descriptor_multiple_autofill.add_listener_port(0); - TCPv6Transport transportUnderTest_multiple_autofill(test_descriptor_multiple_autofill); - transportUnderTest_multiple_autofill.init(); - - EXPECT_TRUE(transportUnderTest_multiple_autofill.configuration()->listening_ports[0] != 0); - EXPECT_TRUE(transportUnderTest_multiple_autofill.configuration()->listening_ports[1] == port); - EXPECT_TRUE(transportUnderTest_multiple_autofill.configuration()->listening_ports[2] != 0); - EXPECT_TRUE( - transportUnderTest_multiple_autofill.configuration()->listening_ports[0] != - transportUnderTest_multiple_autofill.configuration()->listening_ports[2]); - EXPECT_TRUE(transportUnderTest_multiple_autofill.configuration()->listening_ports.size() == 3); } static void GetIP6s(