Skip to content

graph_listener error when mocking rcl_node_get_graph_guard_condition, #1341

Closed as not planned

Description

@Blast545

I found this problem when adding coverage tests #1330. The following test is failing in Windows (and it's flaky on MacOS):

TEST_F(TestGraphListener, error_run_graph_listener_mock_get_graph_cond) {
  auto global_context = rclcpp::contexts::get_global_default_context();
  auto graph_listener_test =
    std::make_shared<TestGraphListenerProtectedMethods>(global_context);
  graph_listener_test->mock_start_thread();
  EXPECT_NO_THROW(graph_listener_test->add_node(node_graph()));
  EXPECT_NE(nullptr, node()->get_node_graph_interface()->get_graph_event());
  auto mock_wait_set_clear = mocking_utils::patch_and_return(
    "lib:rclcpp", rcl_node_get_graph_guard_condition, nullptr);
  RCLCPP_EXPECT_THROW_EQ(
    graph_listener_test->run_protected(),
    std::runtime_error("failed to get graph guard condition: error not set"));
}

Reference build: https://ci.ros2.org/job/ci_windows/12411/testReport/junit/projectroot/test/test_graph_listener/

I haven't investigated the reason yet, I'll take a look later this week.

Activity

  1. self-assigned this
    on Sep 28, 2020
  2. added
    macOS
    tests
    Windows
    on Nov 4, 2020
  3. CursedRock17 commented on Sep 28, 2023

    @CursedRock17
    Contributor

    Since this test doesn't exist anymore and the draft linked to this issue was solved by #1404, this can probably be closed right?

  4. clalancette commented on Sep 28, 2023

    @clalancette
    Contributor

    Yeah, I'm going to close this. It is really stale, and if we come across something like this again we'll just debug it separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

WindowsmacOStests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions