Skip to content

Commit edf2605

Browse files
committed
TEMP: Workaround for unittests failing during shutdown
Using quick_exit instead of return/exit avoids calling all cleanup functions, which fail due to a bug in rmw_fastrtps_cpp.
1 parent bb047c8 commit edf2605

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

core/test/test_move_relative.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,5 +133,6 @@ int main(int argc, char** argv) {
133133
testing::InitGoogleTest(&argc, argv);
134134
rclcpp::init(argc, argv);
135135

136-
return RUN_ALL_TESTS();
136+
// Using quick_exit to avoid calling cleanup functions, which cause a segfault in rmw
137+
quick_exit(RUN_ALL_TESTS());
137138
}

visualization/motion_planning_tasks/test/test_task_model.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,5 +239,6 @@ int main(int argc, char** argv) {
239239
auto test_result = RUN_ALL_TESTS();
240240
app.exit(test_result);
241241
});
242-
return app.exec();
242+
// Using quick_exit to avoid calling cleanup functions, which cause a segfault in rmw
243+
quick_exit(app.exec());
243244
}

0 commit comments

Comments
 (0)