diff --git a/test/unittest/dds/subscriber/DataReaderTests.cpp b/test/unittest/dds/subscriber/DataReaderTests.cpp index 8b2b7615f4c..3e9520e1f43 100644 --- a/test/unittest/dds/subscriber/DataReaderTests.cpp +++ b/test/unittest/dds/subscriber/DataReaderTests.cpp @@ -3464,8 +3464,10 @@ TEST_F(DataReaderTests, InstancePolicyAllocationConsistencyKeyed) // Below an ampliation of the last comprobation, for which it is proved the case of < 0 (-1), // which also means infinite value. - qos2.resource_limits().max_samples = 0; + // Updated to check negative values (Redmine ticket #20722) + qos2.resource_limits().max_samples = -1; qos2.resource_limits().max_instances = -1; + qos2.resource_limits().max_samples_per_instance = -1; ASSERT_EQ(ReturnCode_t::RETCODE_OK, default_data_reader2->set_qos(qos2));