Skip to content

Commit

Permalink
linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sgmurray committed Dec 18, 2022
1 parent 1a989bf commit b669cb8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
12 changes: 6 additions & 6 deletions controller_manager/test/test_controller_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,17 @@ TEST_P(TestControllerManager, controller_lifecycle)

// configure controller
auto configure_future = std::async(
std::launch::async, &controller_manager::ControllerManager::configure_controller,
cm_, test_controller::TEST_CONTROLLER_NAME);
std::launch::async, &controller_manager::ControllerManager::configure_controller, cm_,
test_controller::TEST_CONTROLLER_NAME);
configure_future.wait_for(std::chrono::milliseconds(100));
EXPECT_EQ(
controller_interface::return_type::OK,
cm_->update(rclcpp::Time(0), rclcpp::Duration::from_seconds(0.01)));
EXPECT_EQ(configure_future.get(), controller_interface::return_type::OK);

configure_future = std::async(
std::launch::async, &controller_manager::ControllerManager::configure_controller,
cm_, TEST_CONTROLLER2_NAME);
std::launch::async, &controller_manager::ControllerManager::configure_controller, cm_,
TEST_CONTROLLER2_NAME);
configure_future.wait_for(std::chrono::milliseconds(100));
EXPECT_EQ(
controller_interface::return_type::OK,
Expand Down Expand Up @@ -232,8 +232,8 @@ TEST_P(TestControllerManager, per_controller_update_rate)

// configure controller
auto configure_future = std::async(
std::launch::async, &controller_manager::ControllerManager::configure_controller,
cm_, test_controller::TEST_CONTROLLER_NAME);
std::launch::async, &controller_manager::ControllerManager::configure_controller, cm_,
test_controller::TEST_CONTROLLER_NAME);
configure_future.wait_for(std::chrono::milliseconds(100));
EXPECT_EQ(
controller_interface::return_type::OK,
Expand Down
20 changes: 8 additions & 12 deletions controller_manager/test/test_load_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,9 @@ TEST_P(TestLoadedControllerParametrized, starting_and_stopping_a_controller)
lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED, controller_if->get_state().id());

// Activate configured controller
auto configure_future = std::async(std::launch::async,
&controller_manager::ControllerManager::configure_controller,
cm_,
controller_name1);
auto configure_future = std::async(
std::launch::async, &controller_manager::ControllerManager::configure_controller, cm_,
controller_name1);
configure_future.wait_for(std::chrono::milliseconds(100));

EXPECT_EQ(
Expand Down Expand Up @@ -257,10 +256,9 @@ TEST_P(TestLoadedControllerParametrized, inactive_controller_cannot_be_configure
// Configure from inactive state
test_controller->simulate_cleanup_failure = false;

auto configure_future = std::async(std::launch::async,
&controller_manager::ControllerManager::configure_controller,
cm_,
controller_name1);
auto configure_future = std::async(
std::launch::async, &controller_manager::ControllerManager::configure_controller, cm_,
controller_name1);
configure_future.wait_for(std::chrono::milliseconds(100));

EXPECT_EQ(
Expand Down Expand Up @@ -443,10 +441,8 @@ TEST_P(TestTwoLoadedControllers, switch_multiple_controllers)
lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED, controller_if2->get_state().id());

auto configure_future = std::async(
std::launch::async,
&controller_manager::ControllerManager::configure_controller,
cm_,
controller_name2);
std::launch::async, &controller_manager::ControllerManager::configure_controller, cm_,
controller_name2);
configure_future.wait_for(std::chrono::milliseconds(1000));
EXPECT_EQ(
controller_interface::return_type::OK,
Expand Down

0 comments on commit b669cb8

Please sign in to comment.