Skip to content

Commit

Permalink
Refs #20313: Modify autofill_port test
Browse files Browse the repository at this point in the history
Signed-off-by: Jesus Perez <[email protected]>
  • Loading branch information
jepemi committed Mar 1, 2024
1 parent b1e28a3 commit cdf6c46
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
16 changes: 0 additions & 16 deletions test/unittest/transport/TCPv4Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
16 changes: 0 additions & 16 deletions test/unittest/transport/TCPv6Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit cdf6c46

Please sign in to comment.