Skip to content

Commit c21d78c

Browse files
authored
Pass rclcpp::QoS to create_service (#507)
Signed-off-by: Shane Loretz <[email protected]>
1 parent 4e28b61 commit c21d78c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

test_quality_of_service/test/test_best_available.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ TEST_F(QosRclcppTestFixture, test_best_available_policies_services) {
144144
std::shared_ptr<rmw_request_id_t>,
145145
std::shared_ptr<test_msgs::srv::Empty::Request>,
146146
std::shared_ptr<test_msgs::srv::Empty::Response>) {},
147-
rmw_qos_profile_best_available);
147+
rclcpp::BestAvailableQoS());
148148
}
149149

150150
TEST_F(QosRclcppTestFixture, test_best_available_policies_clients) {

test_rclcpp/test/test_client_scope_consistency_server.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ int main(int argc, char ** argv)
3434
auto node = rclcpp::Node::make_shared("client_scope_consistency_regression_test_server");
3535

3636
// Replicate the settings that caused https://github.com/ros2/system_tests/issues/153
37-
rmw_qos_profile_t rmw_qos_profile = rmw_qos_profile_default;
37+
rclcpp::QoS qos(rclcpp::QoSInitialization::from_rmw(rmw_qos_profile_default));
3838
auto service = node->create_service<test_rclcpp::srv::AddTwoInts>(
39-
"client_scope", handle_add_two_ints, rmw_qos_profile);
39+
"client_scope", handle_add_two_ints, qos);
4040

4141
rclcpp::WallRate loop_rate(30);
4242
try {

test_rclcpp/test/test_multithreaded.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ TEST_F(CLASSNAME(test_multithreaded, RMW_IMPLEMENTATION), multi_consumer_clients
185185
auto callback_group = node->create_callback_group(
186186
rclcpp::CallbackGroupType::Reentrant);
187187
auto service = node->create_service<test_rclcpp::srv::AddTwoInts>(
188-
"multi_consumer_clients", callback, qos_profile.get_rmw_qos_profile(), callback_group);
188+
"multi_consumer_clients", callback, qos_profile, callback_group);
189189

190190
using ClientRequestPair = std::pair<
191191
rclcpp::Client<test_rclcpp::srv::AddTwoInts>::SharedPtr,

0 commit comments

Comments
 (0)