Skip to content

Commit 048f02a

Browse files
rotuBlast545
authored andcommitted
Don't check history depth if RMW_QOS_POLICY_HISTORY_KEEP_ALL (#593)
Signed-off-by: Dan Rose <[email protected]> Signed-off-by: Jorge Perez <[email protected]>
1 parent c2212d1 commit 048f02a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

rcl/test/rcl/test_get_actual_qos.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ TEST_P_RMW(TestPublisherGetActualQoS, test_publisher_get_qos_settings)
171171
EXPECT_EQ(
172172
qos->history,
173173
parameters.qos_expected.history);
174-
EXPECT_EQ(
175-
qos->depth,
176-
parameters.qos_expected.depth);
174+
if (parameters.qos_expected.history == RMW_QOS_POLICY_HISTORY_KEEP_LAST) {
175+
EXPECT_EQ(qos->depth, parameters.qos_expected.depth);
176+
}
177177
EXPECT_EQ(
178178
qos->reliability,
179179
parameters.qos_expected.reliability);
@@ -226,9 +226,9 @@ TEST_P_RMW(TestSubscriptionGetActualQoS, test_subscription_get_qos_settings)
226226
EXPECT_EQ(
227227
qos->history,
228228
parameters.qos_expected.history);
229-
EXPECT_EQ(
230-
qos->depth,
231-
parameters.qos_expected.depth);
229+
if (parameters.qos_expected.history == RMW_QOS_POLICY_HISTORY_KEEP_LAST) {
230+
EXPECT_EQ(qos->depth, parameters.qos_expected.depth);
231+
}
232232
EXPECT_EQ(
233233
qos->reliability,
234234
parameters.qos_expected.reliability);

0 commit comments

Comments
 (0)