diff --git a/controller_manager/test/test_spawner_unspawner.cpp b/controller_manager/test/test_spawner_unspawner.cpp index 973a8362fb..b374ae08e0 100644 --- a/controller_manager/test/test_spawner_unspawner.cpp +++ b/controller_manager/test/test_spawner_unspawner.cpp @@ -392,13 +392,13 @@ TEST_F(TestLoadController, spawner_test_with_wildcard_entries_with_no_ctrl_name) ASSERT_EQ(cm_->get_loaded_controllers().size(), 3ul); - auto wildcard_ctrl_3 = cm_->get_loaded_controllers()[0]; - ASSERT_EQ(wildcard_ctrl_3.info.name, "wildcard_ctrl_3"); - ASSERT_EQ(wildcard_ctrl_3.info.type, test_controller::TEST_CONTROLLER_CLASS_NAME); + auto wildcard_ctrl_1 = cm_->get_loaded_controllers()[0]; + ASSERT_EQ(wildcard_ctrl_1.info.name, "wildcard_ctrl_1"); + ASSERT_EQ(wildcard_ctrl_1.info.type, test_controller::TEST_CONTROLLER_CLASS_NAME); ASSERT_EQ( - wildcard_ctrl_3.c->get_state().id(), + wildcard_ctrl_1.c->get_state().id(), lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE); - verify_ctrl_parameter(wildcard_ctrl_3.c->get_node(), true); + verify_ctrl_parameter(wildcard_ctrl_1.c->get_node(), false); auto wildcard_ctrl_2 = cm_->get_loaded_controllers()[1]; ASSERT_EQ(wildcard_ctrl_2.info.name, "wildcard_ctrl_2"); @@ -408,13 +408,13 @@ TEST_F(TestLoadController, spawner_test_with_wildcard_entries_with_no_ctrl_name) lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE); verify_ctrl_parameter(wildcard_ctrl_2.c->get_node(), false); - auto wildcard_ctrl_1 = cm_->get_loaded_controllers()[2]; - ASSERT_EQ(wildcard_ctrl_1.info.name, "wildcard_ctrl_1"); - ASSERT_EQ(wildcard_ctrl_1.info.type, test_controller::TEST_CONTROLLER_CLASS_NAME); + auto wildcard_ctrl_3 = cm_->get_loaded_controllers()[2]; + ASSERT_EQ(wildcard_ctrl_3.info.name, "wildcard_ctrl_3"); + ASSERT_EQ(wildcard_ctrl_3.info.type, test_controller::TEST_CONTROLLER_CLASS_NAME); ASSERT_EQ( - wildcard_ctrl_1.c->get_state().id(), + wildcard_ctrl_3.c->get_state().id(), lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE); - verify_ctrl_parameter(wildcard_ctrl_1.c->get_node(), false); + verify_ctrl_parameter(wildcard_ctrl_3.c->get_node(), true); } TEST_F(TestLoadController, unload_on_kill)