File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -128,9 +128,11 @@ TEST_F(ImageProcTest, monoSubscription)
128128 RCLCPP_INFO (node->get_logger (), " Publishing" );
129129
130130 RCLCPP_INFO (node->get_logger (), " Spinning" );
131+ rclcpp::executors::SingleThreadedExecutor executor;
132+ executor.add_node (node);
131133 while (!has_new_image_) {
132134 publishRaw ();
133- rclcpp:: spin_some (node );
135+ executor. spin_some ();
134136 }
135137 rclcpp::shutdown ();
136138 RCLCPP_INFO (node->get_logger (), " Done" );
Original file line number Diff line number Diff line change @@ -228,8 +228,10 @@ TEST_F(ImageProcRectifyTest, rectifyTest)
228228
229229 // use original cam_info
230230 publishRaw ();
231+ rclcpp::executors::SingleThreadedExecutor executor;
232+ executor.add_node (node);
231233 while (!has_new_image_) {
232- rclcpp:: spin_some (node );
234+ executor. spin_some ();
233235 loop_rate.sleep ();
234236 }
235237
@@ -247,7 +249,7 @@ TEST_F(ImageProcRectifyTest, rectifyTest)
247249 publishRaw ();
248250
249251 while (!has_new_image_) {
250- rclcpp:: spin_some (node );
252+ executor. spin_some ();
251253 loop_rate.sleep ();
252254 }
253255
@@ -259,7 +261,7 @@ TEST_F(ImageProcRectifyTest, rectifyTest)
259261 publishRaw ();
260262
261263 while (!has_new_image_) {
262- rclcpp:: spin_some (node );
264+ executor. spin_some ();
263265 loop_rate.sleep ();
264266 }
265267
@@ -271,7 +273,7 @@ TEST_F(ImageProcRectifyTest, rectifyTest)
271273 publishRaw ();
272274
273275 while (!has_new_image_) {
274- rclcpp:: spin_some (node );
276+ executor. spin_some ();
275277 loop_rate.sleep ();
276278 }
277279
You can’t perform that action at this time.
0 commit comments