Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions rclcpp_action/test/test_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ TEST_F(TestClient, async_send_goal_but_ignore_feedback_and_result)
auto action_client = rclcpp_action::create_client<ActionType>(client_node, action_name);
ASSERT_TRUE(action_client->wait_for_action_server(WAIT_FOR_SERVER_TIMEOUT));

ASSERT_TRUE(action_client->wait_for_action_server(std::chrono::seconds(10)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does adding 10 seconds to WAIT_FOR_SERVER_TIMEOUT on the line above this one also fix the issue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XD I didn't even see that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So my grep skills failed me.

It looks like it is already waiting for 10 seconds... odd that an additional wait causes the tests to pass 🙁

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests were not actually waiting anywhere close to 10 seconds either.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oooh, my bad. I was working off of the crystal branch, which is missing the wait calls.


ActionGoal bad_goal;
bad_goal.order = -5;
auto future_goal_handle = action_client->async_send_goal(bad_goal, nullptr, true);
Expand All @@ -295,6 +297,8 @@ TEST_F(TestClient, async_send_goal_and_ignore_feedback_but_wait_for_result)
auto action_client = rclcpp_action::create_client<ActionType>(client_node, action_name);
ASSERT_TRUE(action_client->wait_for_action_server(WAIT_FOR_SERVER_TIMEOUT));

ASSERT_TRUE(action_client->wait_for_action_server(std::chrono::seconds(10)));

ActionGoal goal;
goal.order = 5;
auto future_goal_handle = action_client->async_send_goal(goal);
Expand All @@ -317,6 +321,8 @@ TEST_F(TestClient, async_send_goal_with_feedback_and_result)
auto action_client = rclcpp_action::create_client<ActionType>(client_node, action_name);
ASSERT_TRUE(action_client->wait_for_action_server(WAIT_FOR_SERVER_TIMEOUT));

ASSERT_TRUE(action_client->wait_for_action_server(std::chrono::seconds(10)));

ActionGoal goal;
goal.order = 4;
int feedback_count = 0;
Expand Down Expand Up @@ -349,6 +355,8 @@ TEST_F(TestClient, async_cancel_one_goal)
auto action_client = rclcpp_action::create_client<ActionType>(client_node, action_name);
ASSERT_TRUE(action_client->wait_for_action_server(WAIT_FOR_SERVER_TIMEOUT));

ASSERT_TRUE(action_client->wait_for_action_server(std::chrono::seconds(10)));

ActionGoal goal;
goal.order = 5;
auto future_goal_handle = action_client->async_send_goal(goal, nullptr, true);
Expand All @@ -367,6 +375,8 @@ TEST_F(TestClient, async_cancel_all_goals)
auto action_client = rclcpp_action::create_client<ActionType>(client_node, action_name);
ASSERT_TRUE(action_client->wait_for_action_server(WAIT_FOR_SERVER_TIMEOUT));

ASSERT_TRUE(action_client->wait_for_action_server(std::chrono::seconds(10)));

ActionGoal goal;
goal.order = 6;
auto future_goal_handle0 = action_client->async_send_goal(goal, nullptr, true);
Expand Down Expand Up @@ -402,6 +412,8 @@ TEST_F(TestClient, async_cancel_some_goals)
auto action_client = rclcpp_action::create_client<ActionType>(client_node, action_name);
ASSERT_TRUE(action_client->wait_for_action_server(WAIT_FOR_SERVER_TIMEOUT));

ASSERT_TRUE(action_client->wait_for_action_server(std::chrono::seconds(10)));

ActionGoal goal;
goal.order = 6;
auto future_goal_handle0 = action_client->async_send_goal(goal, nullptr, true);
Expand Down