Skip to content

Commit a4be32a

Browse files
cwechtBarry-Xu-2018
authored andcommitted
Enable callback group tests for connextdds (ros2#2182)
* Enable callback group tests for connextdds * Enable executors and event executor tests for connextdds * Enable qos events tests for connextdds * Less flaky qos_event tests Signed-off-by: Christopher Wecht <[email protected]>
1 parent 023002e commit a4be32a

File tree

4 files changed

+36
-278
lines changed

4 files changed

+36
-278
lines changed

rclcpp/test/rclcpp/executors/test_events_executor.cpp

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ class TestEventsExecutor : public ::testing::Test
4343

4444
TEST_F(TestEventsExecutor, run_pub_sub)
4545
{
46-
// rmw_connextdds doesn't support events-executor
47-
if (std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0) {
48-
GTEST_SKIP();
49-
}
50-
5146
auto node = std::make_shared<rclcpp::Node>("node");
5247

5348
bool msg_received = false;
@@ -95,11 +90,6 @@ TEST_F(TestEventsExecutor, run_pub_sub)
9590

9691
TEST_F(TestEventsExecutor, run_clients_servers)
9792
{
98-
// rmw_connextdds doesn't support events-executor
99-
if (std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0) {
100-
GTEST_SKIP();
101-
}
102-
10393
auto node = std::make_shared<rclcpp::Node>("node");
10494

10595
bool request_received = false;
@@ -153,11 +143,6 @@ TEST_F(TestEventsExecutor, run_clients_servers)
153143

154144
TEST_F(TestEventsExecutor, spin_once_max_duration_timeout)
155145
{
156-
// rmw_connextdds doesn't support events-executor
157-
if (std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0) {
158-
GTEST_SKIP();
159-
}
160-
161146
auto node = std::make_shared<rclcpp::Node>("node");
162147

163148
EventsExecutor executor;
@@ -190,11 +175,6 @@ TEST_F(TestEventsExecutor, spin_once_max_duration_timeout)
190175

191176
TEST_F(TestEventsExecutor, spin_once_max_duration_timer)
192177
{
193-
// rmw_connextdds doesn't support events-executor
194-
if (std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0) {
195-
GTEST_SKIP();
196-
}
197-
198178
auto node = std::make_shared<rclcpp::Node>("node");
199179

200180
EventsExecutor executor;
@@ -226,11 +206,6 @@ TEST_F(TestEventsExecutor, spin_once_max_duration_timer)
226206

227207
TEST_F(TestEventsExecutor, spin_some_max_duration)
228208
{
229-
// rmw_connextdds doesn't support events-executor
230-
if (std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0) {
231-
GTEST_SKIP();
232-
}
233-
234209
{
235210
auto node = std::make_shared<rclcpp::Node>("node");
236211

@@ -277,11 +252,6 @@ TEST_F(TestEventsExecutor, spin_some_max_duration)
277252

278253
TEST_F(TestEventsExecutor, spin_some_zero_duration)
279254
{
280-
// rmw_connextdds doesn't support events-executor
281-
if (std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0) {
282-
GTEST_SKIP();
283-
}
284-
285255
auto node = std::make_shared<rclcpp::Node>("node");
286256

287257
size_t t_runs = 0;
@@ -303,11 +273,6 @@ TEST_F(TestEventsExecutor, spin_some_zero_duration)
303273

304274
TEST_F(TestEventsExecutor, spin_all_max_duration)
305275
{
306-
// rmw_connextdds doesn't support events-executor
307-
if (std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0) {
308-
GTEST_SKIP();
309-
}
310-
311276
{
312277
auto node = std::make_shared<rclcpp::Node>("node");
313278

@@ -358,11 +323,6 @@ TEST_F(TestEventsExecutor, spin_all_max_duration)
358323

359324
TEST_F(TestEventsExecutor, cancel_while_timers_running)
360325
{
361-
// rmw_connextdds doesn't support events-executor
362-
if (std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0) {
363-
GTEST_SKIP();
364-
}
365-
366326
auto node = std::make_shared<rclcpp::Node>("node");
367327

368328
EventsExecutor executor;
@@ -402,11 +362,6 @@ TEST_F(TestEventsExecutor, cancel_while_timers_running)
402362

403363
TEST_F(TestEventsExecutor, cancel_while_timers_waiting)
404364
{
405-
// rmw_connextdds doesn't support events-executor
406-
if (std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0) {
407-
GTEST_SKIP();
408-
}
409-
410365
auto node = std::make_shared<rclcpp::Node>("node");
411366

412367
size_t t1_runs = 0;
@@ -435,11 +390,6 @@ TEST_F(TestEventsExecutor, destroy_entities)
435390
// This test fails on Windows! We skip it for now
436391
GTEST_SKIP();
437392

438-
// rmw_connextdds doesn't support events-executor
439-
if (std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0) {
440-
GTEST_SKIP();
441-
}
442-
443393
// Create a publisher node and start publishing messages
444394
auto node_pub = std::make_shared<rclcpp::Node>("node_pub");
445395
auto publisher = node_pub->create_publisher<test_msgs::msg::Empty>("topic", rclcpp::QoS(10));
@@ -485,11 +435,6 @@ std::string * g_sub_log_msg;
485435
std::promise<void> * g_log_msgs_promise;
486436
TEST_F(TestEventsExecutor, test_default_incompatible_qos_callbacks)
487437
{
488-
// rmw_connextdds doesn't support events-executor
489-
if (std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0) {
490-
GTEST_SKIP();
491-
}
492-
493438
auto node = std::make_shared<rclcpp::Node>("node");
494439
rcutils_logging_output_handler_t original_output_handler = rcutils_logging_get_output_handler();
495440

rclcpp/test/rclcpp/executors/test_executors.cpp

Lines changed: 0 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,6 @@ TYPED_TEST_SUITE(TestExecutorsStable, StandardExecutors, ExecutorTypeNames);
135135
TYPED_TEST(TestExecutors, detachOnDestruction)
136136
{
137137
using ExecutorType = TypeParam;
138-
// rmw_connextdds doesn't support events-executor
139-
if (
140-
std::is_same<ExecutorType, rclcpp::experimental::executors::EventsExecutor>() &&
141-
std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0)
142-
{
143-
GTEST_SKIP();
144-
}
145-
146138
{
147139
ExecutorType executor;
148140
executor.add_node(this->node);
@@ -159,14 +151,6 @@ TYPED_TEST(TestExecutors, detachOnDestruction)
159151
TYPED_TEST(TestExecutorsStable, addTemporaryNode)
160152
{
161153
using ExecutorType = TypeParam;
162-
// rmw_connextdds doesn't support events-executor
163-
if (
164-
std::is_same<ExecutorType, rclcpp::experimental::executors::EventsExecutor>() &&
165-
std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0)
166-
{
167-
GTEST_SKIP();
168-
}
169-
170154
ExecutorType executor;
171155

172156
{
@@ -187,14 +171,6 @@ TYPED_TEST(TestExecutorsStable, addTemporaryNode)
187171
TYPED_TEST(TestExecutors, emptyExecutor)
188172
{
189173
using ExecutorType = TypeParam;
190-
// rmw_connextdds doesn't support events-executor
191-
if (
192-
std::is_same<ExecutorType, rclcpp::experimental::executors::EventsExecutor>() &&
193-
std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0)
194-
{
195-
GTEST_SKIP();
196-
}
197-
198174
ExecutorType executor;
199175
std::thread spinner([&]() {EXPECT_NO_THROW(executor.spin());});
200176
std::this_thread::sleep_for(50ms);
@@ -206,14 +182,6 @@ TYPED_TEST(TestExecutors, emptyExecutor)
206182
TYPED_TEST(TestExecutors, addNodeTwoExecutors)
207183
{
208184
using ExecutorType = TypeParam;
209-
// rmw_connextdds doesn't support events-executor
210-
if (
211-
std::is_same<ExecutorType, rclcpp::experimental::executors::EventsExecutor>() &&
212-
std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0)
213-
{
214-
GTEST_SKIP();
215-
}
216-
217185
ExecutorType executor1;
218186
ExecutorType executor2;
219187
EXPECT_NO_THROW(executor1.add_node(this->node));
@@ -225,14 +193,6 @@ TYPED_TEST(TestExecutors, addNodeTwoExecutors)
225193
TYPED_TEST(TestExecutors, spinWithTimer)
226194
{
227195
using ExecutorType = TypeParam;
228-
// rmw_connextdds doesn't support events-executor
229-
if (
230-
std::is_same<ExecutorType, rclcpp::experimental::executors::EventsExecutor>() &&
231-
std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0)
232-
{
233-
GTEST_SKIP();
234-
}
235-
236196
ExecutorType executor;
237197

238198
bool timer_completed = false;
@@ -256,14 +216,6 @@ TYPED_TEST(TestExecutors, spinWithTimer)
256216
TYPED_TEST(TestExecutors, spinWhileAlreadySpinning)
257217
{
258218
using ExecutorType = TypeParam;
259-
// rmw_connextdds doesn't support events-executor
260-
if (
261-
std::is_same<ExecutorType, rclcpp::experimental::executors::EventsExecutor>() &&
262-
std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0)
263-
{
264-
GTEST_SKIP();
265-
}
266-
267219
ExecutorType executor;
268220
executor.add_node(this->node);
269221

@@ -291,14 +243,6 @@ TYPED_TEST(TestExecutors, spinWhileAlreadySpinning)
291243
TYPED_TEST(TestExecutors, testSpinUntilFutureComplete)
292244
{
293245
using ExecutorType = TypeParam;
294-
// rmw_connextdds doesn't support events-executor
295-
if (
296-
std::is_same<ExecutorType, rclcpp::experimental::executors::EventsExecutor>() &&
297-
std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0)
298-
{
299-
GTEST_SKIP();
300-
}
301-
302246
ExecutorType executor;
303247
executor.add_node(this->node);
304248

@@ -322,14 +266,6 @@ TYPED_TEST(TestExecutors, testSpinUntilFutureComplete)
322266
TYPED_TEST(TestExecutors, testSpinUntilSharedFutureComplete)
323267
{
324268
using ExecutorType = TypeParam;
325-
// rmw_connextdds doesn't support events-executor
326-
if (
327-
std::is_same<ExecutorType, rclcpp::experimental::executors::EventsExecutor>() &&
328-
std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0)
329-
{
330-
GTEST_SKIP();
331-
}
332-
333269
ExecutorType executor;
334270
executor.add_node(this->node);
335271

@@ -354,14 +290,6 @@ TYPED_TEST(TestExecutors, testSpinUntilSharedFutureComplete)
354290
TYPED_TEST(TestExecutors, testSpinUntilFutureCompleteNoTimeout)
355291
{
356292
using ExecutorType = TypeParam;
357-
// rmw_connextdds doesn't support events-executor
358-
if (
359-
std::is_same<ExecutorType, rclcpp::experimental::executors::EventsExecutor>() &&
360-
std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0)
361-
{
362-
GTEST_SKIP();
363-
}
364-
365293
ExecutorType executor;
366294
executor.add_node(this->node);
367295

@@ -409,14 +337,6 @@ TYPED_TEST(TestExecutors, testSpinUntilFutureCompleteNoTimeout)
409337
TYPED_TEST(TestExecutors, testSpinUntilFutureCompleteWithTimeout)
410338
{
411339
using ExecutorType = TypeParam;
412-
// rmw_connextdds doesn't support events-executor
413-
if (
414-
std::is_same<ExecutorType, rclcpp::experimental::executors::EventsExecutor>() &&
415-
std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0)
416-
{
417-
GTEST_SKIP();
418-
}
419-
420340
ExecutorType executor;
421341
executor.add_node(this->node);
422342

@@ -529,14 +449,6 @@ class TestWaitable : public rclcpp::Waitable
529449
TYPED_TEST(TestExecutors, spinAll)
530450
{
531451
using ExecutorType = TypeParam;
532-
// rmw_connextdds doesn't support events-executor
533-
if (
534-
std::is_same<ExecutorType, rclcpp::experimental::executors::EventsExecutor>() &&
535-
std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0)
536-
{
537-
GTEST_SKIP();
538-
}
539-
540452
ExecutorType executor;
541453
auto waitable_interfaces = this->node->get_node_waitables_interface();
542454
auto my_waitable = std::make_shared<TestWaitable>();
@@ -579,14 +491,6 @@ TYPED_TEST(TestExecutors, spinAll)
579491
TYPED_TEST(TestExecutors, spinSome)
580492
{
581493
using ExecutorType = TypeParam;
582-
// rmw_connextdds doesn't support events-executor
583-
if (
584-
std::is_same<ExecutorType, rclcpp::experimental::executors::EventsExecutor>() &&
585-
std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0)
586-
{
587-
GTEST_SKIP();
588-
}
589-
590494
ExecutorType executor;
591495
auto waitable_interfaces = this->node->get_node_waitables_interface();
592496
auto my_waitable = std::make_shared<TestWaitable>();
@@ -629,14 +533,6 @@ TYPED_TEST(TestExecutors, spinSome)
629533
TYPED_TEST(TestExecutors, testSpinNodeUntilFutureCompleteNodeBasePtr)
630534
{
631535
using ExecutorType = TypeParam;
632-
// rmw_connextdds doesn't support events-executor
633-
if (
634-
std::is_same<ExecutorType, rclcpp::experimental::executors::EventsExecutor>() &&
635-
std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0)
636-
{
637-
GTEST_SKIP();
638-
}
639-
640536
ExecutorType executor;
641537

642538
std::promise<bool> promise;
@@ -653,14 +549,6 @@ TYPED_TEST(TestExecutors, testSpinNodeUntilFutureCompleteNodeBasePtr)
653549
TYPED_TEST(TestExecutors, testSpinNodeUntilFutureCompleteNodePtr)
654550
{
655551
using ExecutorType = TypeParam;
656-
// rmw_connextdds doesn't support events-executor
657-
if (
658-
std::is_same<ExecutorType, rclcpp::experimental::executors::EventsExecutor>() &&
659-
std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0)
660-
{
661-
GTEST_SKIP();
662-
}
663-
664552
ExecutorType executor;
665553

666554
std::promise<bool> promise;
@@ -677,14 +565,6 @@ TYPED_TEST(TestExecutors, testSpinNodeUntilFutureCompleteNodePtr)
677565
TYPED_TEST(TestExecutors, testSpinUntilFutureCompleteInterrupted)
678566
{
679567
using ExecutorType = TypeParam;
680-
// rmw_connextdds doesn't support events-executor
681-
if (
682-
std::is_same<ExecutorType, rclcpp::experimental::executors::EventsExecutor>() &&
683-
std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") == 0)
684-
{
685-
GTEST_SKIP();
686-
}
687-
688568
ExecutorType executor;
689569
executor.add_node(this->node);
690570

0 commit comments

Comments
 (0)