diff --git a/test/unittest/transport/TCPv4Tests.cpp b/test/unittest/transport/TCPv4Tests.cpp index 65293cbf25e..cc11a5b1d50 100644 --- a/test/unittest/transport/TCPv4Tests.cpp +++ b/test/unittest/transport/TCPv4Tests.cpp @@ -149,9 +149,11 @@ TEST_F(TCPv4Tests, wrong_configuration_values) ASSERT_TRUE(transportUnderTest.init()); auto* final_cfg = transportUnderTest.configuration(); EXPECT_GE(final_cfg->sendBufferSize, final_cfg->maxMessageSize); - EXPECT_LT(final_cfg->sendBufferSize, wrong_descriptor.sendBufferSize); + // The system could allow for the send buffer to be MAX_INT, so we cannot check it to be strictly lower + EXPECT_LE(final_cfg->sendBufferSize, wrong_descriptor.sendBufferSize); EXPECT_GE(final_cfg->receiveBufferSize, final_cfg->maxMessageSize); - EXPECT_LT(final_cfg->receiveBufferSize, wrong_descriptor.receiveBufferSize); + // The system could allow for the receive buffer to be MAX_INT, so we cannot check it to be strictly lower + EXPECT_LE(final_cfg->receiveBufferSize, wrong_descriptor.receiveBufferSize); eprosima::fastdds::dds::Log::Flush(); } } diff --git a/test/unittest/transport/TCPv6Tests.cpp b/test/unittest/transport/TCPv6Tests.cpp index 1a04363e43e..ee7f5a7361e 100644 --- a/test/unittest/transport/TCPv6Tests.cpp +++ b/test/unittest/transport/TCPv6Tests.cpp @@ -145,9 +145,11 @@ TEST_F(TCPv6Tests, wrong_configuration_values) ASSERT_TRUE(transportUnderTest.init()); auto* final_cfg = transportUnderTest.configuration(); EXPECT_GE(final_cfg->sendBufferSize, final_cfg->maxMessageSize); - EXPECT_LT(final_cfg->sendBufferSize, wrong_descriptor.sendBufferSize); + // The system could allow for the send buffer to be MAX_INT, so we cannot check it to be strictly lower + EXPECT_LE(final_cfg->sendBufferSize, wrong_descriptor.sendBufferSize); EXPECT_GE(final_cfg->receiveBufferSize, final_cfg->maxMessageSize); - EXPECT_LT(final_cfg->receiveBufferSize, wrong_descriptor.receiveBufferSize); + // The system could allow for the receive buffer to be MAX_INT, so we cannot check it to be strictly lower + EXPECT_LE(final_cfg->receiveBufferSize, wrong_descriptor.receiveBufferSize); eprosima::fastdds::dds::Log::Flush(); } } diff --git a/test/unittest/transport/UDPv4Tests.cpp b/test/unittest/transport/UDPv4Tests.cpp index df95b38c7af..54bfc4561ef 100644 --- a/test/unittest/transport/UDPv4Tests.cpp +++ b/test/unittest/transport/UDPv4Tests.cpp @@ -136,9 +136,11 @@ TEST_F(UDPv4Tests, wrong_configuration) ASSERT_TRUE(transportUnderTest.init()); auto* final_cfg = transportUnderTest.configuration(); EXPECT_GE(final_cfg->sendBufferSize, final_cfg->maxMessageSize); - EXPECT_LT(final_cfg->sendBufferSize, wrong_descriptor.sendBufferSize); + // The system could allow for the send buffer to be MAX_INT, so we cannot check it to be strictly lower + EXPECT_LE(final_cfg->sendBufferSize, wrong_descriptor.sendBufferSize); EXPECT_GE(final_cfg->receiveBufferSize, final_cfg->maxMessageSize); - EXPECT_LT(final_cfg->receiveBufferSize, wrong_descriptor.receiveBufferSize); + // The system could allow for the receive buffer to be MAX_INT, so we cannot check it to be strictly lower + EXPECT_LE(final_cfg->receiveBufferSize, wrong_descriptor.receiveBufferSize); eprosima::fastdds::dds::Log::Flush(); } } diff --git a/test/unittest/transport/UDPv6Tests.cpp b/test/unittest/transport/UDPv6Tests.cpp index 60ff08a3c36..44497c72abb 100644 --- a/test/unittest/transport/UDPv6Tests.cpp +++ b/test/unittest/transport/UDPv6Tests.cpp @@ -143,9 +143,11 @@ TEST_F(UDPv6Tests, wrong_configuration) ASSERT_TRUE(transportUnderTest.init()); auto* final_cfg = transportUnderTest.configuration(); EXPECT_GE(final_cfg->sendBufferSize, final_cfg->maxMessageSize); - EXPECT_LT(final_cfg->sendBufferSize, wrong_descriptor.sendBufferSize); + // The system could allow for the send buffer to be MAX_INT, so we cannot check it to be strictly lower + EXPECT_LE(final_cfg->sendBufferSize, wrong_descriptor.sendBufferSize); EXPECT_GE(final_cfg->receiveBufferSize, final_cfg->maxMessageSize); - EXPECT_LT(final_cfg->receiveBufferSize, wrong_descriptor.receiveBufferSize); + // The system could allow for the receive buffer to be MAX_INT, so we cannot check it to be strictly lower + EXPECT_LE(final_cfg->receiveBufferSize, wrong_descriptor.receiveBufferSize); eprosima::fastdds::dds::Log::Flush(); } }