Skip to content

Commit

Permalink
Fix spawner unload on kill test (ros-controls#1675)
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor authored Aug 14, 2024
1 parent 32155cc commit 07fb4f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controller_manager/test/test_spawner_unspawner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,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
cm_->set_parameter(rclcpp::Parameter("ctrl_3.type", test_controller::TEST_CONTROLLER_CLASS_NAME));
std::stringstream ss;
ss << "timeout --signal=INT 5 "
<< "ros2 run controller_manager spawner "
<< "ctrl_3 -c test_controller_manager -t "
<< std::string(test_controller::TEST_CONTROLLER_CLASS_NAME) << " --unload-on-kill";
<< "ros2 run controller_manager spawner ctrl_3 -c test_controller_manager"
<< " --unload-on-kill";

EXPECT_NE(std::system(ss.str().c_str()), 0)
<< "timeout should have killed spawner and returned non 0 code";
Expand Down

0 comments on commit 07fb4f3

Please sign in to comment.