From d8f03ecf76a8936e6cb0e3b0cdd3a712ce775872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dr=2E=20Denis=20=C5=A0togl?= Date: Mon, 18 Dec 2023 15:06:24 +0100 Subject: [PATCH] Fix tests. --- controller_manager/test/test_spawner_unspawner.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controller_manager/test/test_spawner_unspawner.cpp b/controller_manager/test/test_spawner_unspawner.cpp index 353f6738ab9..03917dcd6e8 100644 --- a/controller_manager/test/test_spawner_unspawner.cpp +++ b/controller_manager/test/test_spawner_unspawner.cpp @@ -327,7 +327,7 @@ TEST_F(TestLoadControllerWithoutRobotDescription, when_no_robot_description_spaw cm_->set_parameter(rclcpp::Parameter("ctrl_1.type", test_controller::TEST_CONTROLLER_CLASS_NAME)); ControllerManagerRunner cm_runner(this); - EXPECT_EQ(call_spawner("ctrl_1 -c test_controller_manager"), 1) + EXPECT_EQ(call_spawner("ctrl_1 -c test_controller_manager"), 256) << "could not spawn controller because not robot description and not services for controller " "manager are active"; } @@ -340,10 +340,10 @@ TEST_F( // Delay sending robot description robot_description_sending_timer_ = cm_->create_wall_timer( - std::chrono::milliseconds(1500), [&]() { pass_robot_description_to_cm_and_rm(); }); + std::chrono::milliseconds(2500), [&]() { pass_robot_description_to_cm_and_rm(); }); ControllerManagerRunner cm_runner(this); - EXPECT_EQ(call_spawner("ctrl_1 -c test_controller_manager"), 1) + EXPECT_EQ(call_spawner("ctrl_1 -c test_controller_manager"), 0) << "could not activate control because not robot description"; ASSERT_EQ(cm_->get_loaded_controllers().size(), 1ul);