Skip to content

Commit 1dc0a67

Browse files
Janosch MachowinskiJanosch Machowinski
authored andcommitted
tests: Added EventsCBGExecutor to executor tests
1 parent e7e65d9 commit 1dc0a67

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

rclcpp/src/rclcpp/executors/events_cbg_executor/events_cbg_executor.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,6 @@ void EventsCBGExecutor::spin_all(std::chrono::nanoseconds max_duration)
433433
}
434434

435435
collect_and_execute_ready_events(max_duration, true);
436-
437-
RCUTILS_LOG_ERROR_NAMED("EventsCBGExecutor", "spin_all done");
438436
}
439437

440438
bool EventsCBGExecutor::collect_and_execute_ready_events(

rclcpp/test/rclcpp/executors/executor_types.hpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <string>
2121
#include <type_traits>
2222

23+
#include "rclcpp/executors/events_cbg_executor/events_cbg_executor.hpp"
2324
#include "rclcpp/experimental/executors/events_executor/events_executor.hpp"
2425
#include "rclcpp/executors/single_threaded_executor.hpp"
2526
#include "rclcpp/executors/multi_threaded_executor.hpp"
@@ -28,6 +29,7 @@ using ExecutorTypes =
2829
::testing::Types<
2930
rclcpp::executors::SingleThreadedExecutor,
3031
rclcpp::executors::MultiThreadedExecutor,
32+
rclcpp::executors::EventsCBGExecutor,
3133
rclcpp::experimental::executors::EventsExecutor>;
3234

3335
class ExecutorTypeNames
@@ -36,15 +38,19 @@ class ExecutorTypeNames
3638
template<typename T>
3739
static std::string GetName([[maybe_unused]] int idx)
3840
{
39-
if (std::is_same<T, rclcpp::executors::SingleThreadedExecutor>()) {
41+
if constexpr (std::is_same<T, rclcpp::executors::SingleThreadedExecutor>()) {
4042
return "SingleThreadedExecutor";
4143
}
4244

43-
if (std::is_same<T, rclcpp::executors::MultiThreadedExecutor>()) {
45+
if constexpr(std::is_same<T, rclcpp::executors::MultiThreadedExecutor>()) {
4446
return "MultiThreadedExecutor";
4547
}
4648

47-
if (std::is_same<T, rclcpp::experimental::executors::EventsExecutor>()) {
49+
if constexpr(std::is_same<T, rclcpp::executors::EventsCBGExecutor>()) {
50+
return "EventsCBGExecutor";
51+
}
52+
53+
if constexpr(std::is_same<T, rclcpp::experimental::executors::EventsExecutor>()) {
4854
return "EventsExecutor";
4955
}
5056

@@ -56,6 +62,7 @@ using StandardExecutors =
5662
::testing::Types<
5763
rclcpp::executors::SingleThreadedExecutor,
5864
rclcpp::executors::MultiThreadedExecutor,
65+
rclcpp::executors::EventsCBGExecutor,
5966
rclcpp::experimental::executors::EventsExecutor>;
6067

6168
#endif // RCLCPP__EXECUTORS__EXECUTOR_TYPES_HPP_

0 commit comments

Comments
 (0)