diff --git a/rossdl_tests/rossdl_simple_test/tests/rossdl_generation_test.cpp b/rossdl_tests/rossdl_simple_test/tests/rossdl_generation_test.cpp index 195f2ce..7500af9 100644 --- a/rossdl_tests/rossdl_simple_test/tests/rossdl_generation_test.cpp +++ b/rossdl_tests/rossdl_simple_test/tests/rossdl_generation_test.cpp @@ -23,11 +23,15 @@ #include "gtest/gtest.h" +using namespace std::chrono_literals; TEST(rossdl_generation_test, image_filter_unit) { auto image_filter = std::make_shared(); + auto start = image_filter->now(); + while (image_filter->now() - start < 100ms) {rclcpp::spin_some(image_filter);} + // Parameters ASSERT_TRUE(image_filter->has_parameter("description_label")); auto param1 = image_filter->get_parameter("description_label"); @@ -81,6 +85,9 @@ TEST(rossdl_generation_test, consumer_unit) { auto consumer = std::make_shared(); + auto start = consumer->now(); + while (consumer->now() - start < 100ms) {rclcpp::spin_some(consumer);} + auto topics = consumer->get_topic_names_and_types(); ASSERT_EQ(topics.size(), 5u); diff --git a/rossdl_tests/rossdl_systems_test/system_a/tests/rossdl_generation_test.cpp b/rossdl_tests/rossdl_systems_test/system_a/tests/rossdl_generation_test.cpp index 56415f8..60194ec 100644 --- a/rossdl_tests/rossdl_systems_test/system_a/tests/rossdl_generation_test.cpp +++ b/rossdl_tests/rossdl_systems_test/system_a/tests/rossdl_generation_test.cpp @@ -22,11 +22,15 @@ #include "gtest/gtest.h" +using namespace std::chrono_literals; TEST(rossdl_generation_test, image_filter_unit) { auto image_filter = std::make_shared(); + auto start = image_filter->now(); + while (image_filter->now() - start < 100ms) {rclcpp::spin_some(image_filter);} + // Parameters ASSERT_TRUE(image_filter->has_parameter("description_label")); auto param1 = image_filter->get_parameter("description_label"); diff --git a/rossdl_tests/rossdl_systems_test/system_b/tests/rossdl_generation_test.cpp b/rossdl_tests/rossdl_systems_test/system_b/tests/rossdl_generation_test.cpp index 2fe5753..19f1c7d 100644 --- a/rossdl_tests/rossdl_systems_test/system_b/tests/rossdl_generation_test.cpp +++ b/rossdl_tests/rossdl_systems_test/system_b/tests/rossdl_generation_test.cpp @@ -22,11 +22,15 @@ #include "gtest/gtest.h" +using namespace std::chrono_literals; TEST(rossdl_generation_test, consumer_unit) { auto consumer = std::make_shared(); + auto start = consumer->now(); + while (consumer->now() - start < 100ms) {rclcpp::spin_some(consumer);} + auto topics = consumer->get_topic_names_and_types(); ASSERT_EQ(topics.size(), 5);