Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spawner tests timeout on source builds (backport #1692) #1697

Merged
merged 4 commits into from
Oct 8, 2024
Merged
Changes from 1 commit
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
15 changes: 15 additions & 0 deletions controller_manager/test/test_spawner_unspawner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,15 @@ TEST_F(TestLoadController, multi_ctrls_test_type_in_param)

TEST_F(TestLoadController, spawner_test_type_in_arg)
{
<<<<<<< HEAD
// Provide controller type via -t argument
=======
const std::string test_file_path = ament_index_cpp::get_package_prefix("controller_manager") +
"/test/test_controller_spawner_with_type.yaml";

ControllerManagerRunner cm_runner(this);
// Provide controller type via the parsed file
>>>>>>> 079392b (Fix spawner tests timeout (#1692))
christophfroehlich marked this conversation as resolved.
Show resolved Hide resolved
EXPECT_EQ(
call_spawner(
"ctrl_2 -c test_controller_manager -t " +
Expand All @@ -239,6 +247,11 @@ TEST_F(TestLoadController, unload_on_kill)
{
// Launch spawner with unload on kill
// timeout command will kill it after the specified time with signal SIGINT
<<<<<<< HEAD
=======
ControllerManagerRunner cm_runner(this);
cm_->set_parameter(rclcpp::Parameter("ctrl_3.type", test_controller::TEST_CONTROLLER_CLASS_NAME));
>>>>>>> 079392b (Fix spawner tests timeout (#1692))
christophfroehlich marked this conversation as resolved.
Show resolved Hide resolved
std::stringstream ss;
ss << "timeout --signal=INT 5 "
<< std::string(coveragepy_script) +
Expand Down Expand Up @@ -507,6 +520,7 @@ TEST_F(TestLoadControllerWithNamespacedCM, spawner_test_type_in_params_file)
const std::string test_file_path = ament_index_cpp::get_package_prefix("controller_manager") +
"/test/test_controller_spawner_with_type.yaml";

ControllerManagerRunner cm_runner(this);
// Provide controller type via the parsed file
EXPECT_EQ(
call_spawner(
Expand Down Expand Up @@ -567,6 +581,7 @@ TEST_F(
const std::string test_file_path = ament_index_cpp::get_package_prefix("controller_manager") +
"/test/test_controller_spawner_with_type.yaml";

ControllerManagerRunner cm_runner(this);
// Provide controller type via the parsed file
EXPECT_EQ(
call_spawner(
Expand Down
Loading