diff --git a/rcl/test/CMakeLists.txt b/rcl/test/CMakeLists.txt index d8c9daa63..56b04eed6 100644 --- a/rcl/test/CMakeLists.txt +++ b/rcl/test/CMakeLists.txt @@ -308,6 +308,7 @@ function(test_target) ament_add_gtest_test(test_events TEST_NAME test_events${target_suffix} ENV ${rmw_implementation_env_var} + TIMEOUT 120 ) ament_add_gtest_test(test_wait diff --git a/rcl/test/rcl/test_events.cpp b/rcl/test/rcl/test_events.cpp index 33ccc914e..20bc7f0d0 100644 --- a/rcl/test/rcl/test_events.cpp +++ b/rcl/test/rcl/test_events.cpp @@ -376,6 +376,10 @@ conditional_wait_for_msgs_and_events( */ TEST_F(TestEventFixture, test_pubsub_no_deadline_missed) { + if (std::string(rmw_get_implementation_identifier()).find("rmw_zenoh_cpp") == 0) { + GTEST_SKIP(); + } + setup_publisher_subscriber_and_events_and_assert_discovery( RCL_PUBLISHER_OFFERED_DEADLINE_MISSED, RCL_SUBSCRIPTION_REQUESTED_DEADLINE_MISSED); @@ -443,6 +447,10 @@ TEST_F(TestEventFixture, test_pubsub_no_deadline_missed) */ TEST_F(TestEventFixture, test_pubsub_deadline_missed) { + if (std::string(rmw_get_implementation_identifier()).find("rmw_zenoh_cpp") == 0) { + GTEST_SKIP(); + } + setup_publisher_subscriber_and_events_and_assert_discovery( RCL_PUBLISHER_OFFERED_DEADLINE_MISSED, RCL_SUBSCRIPTION_REQUESTED_DEADLINE_MISSED); @@ -518,6 +526,10 @@ TEST_F(TestEventFixture, test_pubsub_deadline_missed) */ TEST_F(TestEventFixture, test_pubsub_liveliness_kill_pub) { + if (std::string(rmw_get_implementation_identifier()).find("rmw_zenoh_cpp") == 0) { + GTEST_SKIP(); + } + setup_publisher_subscriber_and_events_and_assert_discovery( RCL_PUBLISHER_LIVELINESS_LOST, RCL_SUBSCRIPTION_LIVELINESS_CHANGED); @@ -597,6 +609,10 @@ TEST_F(TestEventFixture, test_pubsub_liveliness_kill_pub) */ TEST_P(TestEventFixture, test_pubsub_incompatible_qos) { + if (std::string(rmw_get_implementation_identifier()).find("rmw_zenoh_cpp") == 0) { + GTEST_SKIP(); + } + const auto & input = GetParam(); const auto & qos_policy_kind = input.qos_policy_kind; const auto & publisher_qos_profile = input.publisher_qos_profile; @@ -695,6 +711,10 @@ TEST_F(TestEventFixture, test_bad_event_ini) */ TEST_F(TestEventFixture, test_event_is_valid) { + if (std::string(rmw_get_implementation_identifier()).find("rmw_zenoh_cpp") == 0) { + GTEST_SKIP(); + } + EXPECT_FALSE(rcl_event_is_valid(nullptr)); EXPECT_TRUE(rcl_error_is_set()); rcl_reset_error(); @@ -707,6 +727,7 @@ TEST_F(TestEventFixture, test_event_is_valid) rcl_ret_t ret = rcl_publisher_event_init( &publisher_event_test, &publisher, RCL_PUBLISHER_OFFERED_DEADLINE_MISSED); + ASSERT_EQ(ret, RCL_RET_OK) << rcl_get_error_string().str; EXPECT_TRUE(rcl_event_is_valid(&publisher_event_test)); @@ -754,6 +775,10 @@ TEST_F(TestEventFixture, test_event_is_invalid) { */ TEST_F(TestEventFixture, test_sub_message_lost_event) { + if (std::string(rmw_get_implementation_identifier()).find("rmw_zenoh_cpp") == 0) { + GTEST_SKIP(); + } + const rmw_qos_profile_t subscription_qos_profile = default_qos_profile; rcl_ret_t ret = setup_subscriber(subscription_qos_profile); @@ -866,6 +891,10 @@ void event_callback(const void * user_data, size_t number_of_events) */ TEST_F(TestEventFixture, test_pub_matched_unmatched_event) { + if (std::string(rmw_get_implementation_identifier()).find("rmw_zenoh_cpp") == 0) { + GTEST_SKIP(); + } + rcl_ret_t ret; // Create one publisher @@ -977,6 +1006,10 @@ TEST_F(TestEventFixture, test_pub_matched_unmatched_event) */ TEST_F(TestEventFixture, test_sub_matched_unmatched_event) { + if (std::string(rmw_get_implementation_identifier()).find("rmw_zenoh_cpp") == 0) { + GTEST_SKIP(); + } + rcl_ret_t ret; // Create one subscriber @@ -1178,6 +1211,10 @@ TEST_F(TestEventFixture, test_pub_previous_matched_event) TEST_F(TestEventFixture, test_sub_previous_matched_event) { + if (std::string(rmw_get_implementation_identifier()).find("rmw_zenoh_cpp") == 0) { + GTEST_SKIP(); + } + // While registering callback for matched event, exist previous matched event // will trigger callback at once.