From 0d0066f7df600ccef7cc896b3a87af1448b7373b Mon Sep 17 00:00:00 2001 From: Sai Kishor Kothakota Date: Mon, 19 Aug 2024 12:23:33 +0200 Subject: [PATCH 1/2] Fix spawner tests timeout (#1692) (cherry picked from commit 079392b94867c3372c0050492327001057118090) # Conflicts: # controller_manager/test/test_spawner_unspawner.cpp --- .../test/test_spawner_unspawner.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/controller_manager/test/test_spawner_unspawner.cpp b/controller_manager/test/test_spawner_unspawner.cpp index 06503dc7a7..03e5740970 100644 --- a/controller_manager/test/test_spawner_unspawner.cpp +++ b/controller_manager/test/test_spawner_unspawner.cpp @@ -252,7 +252,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)) EXPECT_EQ( call_spawner( "ctrl_2 -c test_controller_manager -t " + @@ -270,6 +278,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)) std::stringstream ss; ss << "timeout --signal=INT 5 " << std::string(coveragepy_script) + @@ -538,6 +551,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( @@ -598,6 +612,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( From 3bde47b15d2f930b22e7ab96492d5236af467605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Mon, 19 Aug 2024 12:45:16 +0200 Subject: [PATCH 2/2] Fix merge conflicts --- controller_manager/test/test_spawner_unspawner.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/controller_manager/test/test_spawner_unspawner.cpp b/controller_manager/test/test_spawner_unspawner.cpp index 03e5740970..a709af915b 100644 --- a/controller_manager/test/test_spawner_unspawner.cpp +++ b/controller_manager/test/test_spawner_unspawner.cpp @@ -252,15 +252,8 @@ 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)) + // Provide controller type via -t argument EXPECT_EQ( call_spawner( "ctrl_2 -c test_controller_manager -t " + @@ -278,11 +271,7 @@ 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)) std::stringstream ss; ss << "timeout --signal=INT 5 " << std::string(coveragepy_script) +