From 53224893a952b627f66f52899db39a7bf7845ae4 Mon Sep 17 00:00:00 2001 From: Dan Rose Date: Wed, 11 Mar 2020 15:26:08 -0500 Subject: [PATCH] [Eloquent] Don't check history depth if RMW_QOS_POLICY_HISTORY_KEEP_ALL (#595) Backport of #593 Signed-off-by: Dan Rose --- rcl/test/rcl/test_get_actual_qos.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rcl/test/rcl/test_get_actual_qos.cpp b/rcl/test/rcl/test_get_actual_qos.cpp index be4f485f0..db645a7af 100644 --- a/rcl/test/rcl/test_get_actual_qos.cpp +++ b/rcl/test/rcl/test_get_actual_qos.cpp @@ -167,9 +167,9 @@ TEST_P_RMW(TestPublisherGetActualQoS, test_publisher_get_qos_settings) EXPECT_EQ( qos->history, parameters.qos_expected.history); - EXPECT_EQ( - qos->depth, - parameters.qos_expected.depth); + if (parameters.qos_expected.history == RMW_QOS_POLICY_HISTORY_KEEP_LAST) { + EXPECT_EQ(qos->depth, parameters.qos_expected.depth); + } EXPECT_EQ( qos->reliability, parameters.qos_expected.reliability); @@ -222,9 +222,9 @@ TEST_P_RMW(TestSubscriptionGetActualQoS, test_subscription_get_qos_settings) EXPECT_EQ( qos->history, parameters.qos_expected.history); - EXPECT_EQ( - qos->depth, - parameters.qos_expected.depth); + if (parameters.qos_expected.history == RMW_QOS_POLICY_HISTORY_KEEP_LAST) { + EXPECT_EQ(qos->depth, parameters.qos_expected.depth); + } EXPECT_EQ( qos->reliability, parameters.qos_expected.reliability);