Skip to content

Commit

Permalink
Disable parameter event publishers on test nodes
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Rose <dan@digilabs.io>
  • Loading branch information
rotu committed Oct 17, 2019
1 parent dc2b161 commit 2903f51
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ class PublisherManager
const std::string & topic_name, std::shared_ptr<T> message, size_t expected_messages = 0)
{
auto node_name = std::string("publisher") + std::to_string(counter_++);
auto publisher_node = std::make_shared<rclcpp::Node>(node_name);
auto publisher_node = std::make_shared<rclcpp::Node>(
node_name,
rclcpp::NodeOptions().start_parameter_event_publisher(false));
auto publisher = publisher_node->create_publisher<T>(topic_name, 10);

publisher_nodes_.push_back(publisher_node);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ class SubscriptionManager
public:
SubscriptionManager()
{
subscriber_node_ = std::make_shared<rclcpp::Node>("subscriber_node");
subscriber_node_ = std::make_shared<rclcpp::Node>(
"subscriber_node",
rclcpp::NodeOptions().start_parameter_event_publisher(false)
);
}

template<typename MessageT>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ TEST_F(RecordIntegrationTestFixture, record_all_without_discovery_ignores_later_
start_recording({true, true, {}, "rmw_format", 1ms});

std::this_thread::sleep_for(100ms);
auto publisher_node = std::make_shared<rclcpp::Node>("publisher_for_test");
auto publisher_node = std::make_shared<rclcpp::Node>(
"publisher_for_test",
rclcpp::NodeOptions().start_parameter_event_publisher(false));
auto publisher = publisher_node->create_publisher<test_msgs::msg::Strings>("/string_topic", 10);
for (int i = 0; i < 5; ++i) {
std::this_thread::sleep_for(20ms);
Expand Down

0 comments on commit 2903f51

Please sign in to comment.