@@ -185,6 +185,14 @@ TEST_F(CLASSNAME(TestCountFixture, RMW_IMPLEMENTATION), test_count_matched_funct
185185
186186 check_state (wait_set_ptr, nullptr , &sub, graph_guard_condition, -1 , 0 , 9 );
187187 check_state (wait_set_ptr, nullptr , &sub2, graph_guard_condition, -1 , 0 , 9 );
188+
189+ ret = rcl_subscription_fini (&sub, this ->node_ptr );
190+ EXPECT_EQ (RCL_RET_OK, ret) << rcl_get_error_string ().str ;
191+ rcl_reset_error ();
192+
193+ ret = rcl_subscription_fini (&sub2, this ->node_ptr );
194+ EXPECT_EQ (RCL_RET_OK, ret) << rcl_get_error_string ().str ;
195+ rcl_reset_error ();
188196}
189197
190198TEST_F (CLASSNAME(TestCountFixture, RMW_IMPLEMENTATION),
@@ -239,6 +247,14 @@ TEST_F(CLASSNAME(TestCountFixture, RMW_IMPLEMENTATION),
239247 check_state (wait_set_ptr, &pub, &sub, graph_guard_condition, 0 , 0 , 9 );
240248 check_state (wait_set_ptr, &pub, &sub2, graph_guard_condition, 0 , 0 , 9 );
241249
250+ ret = rcl_subscription_fini (&sub, this ->node_ptr );
251+ EXPECT_EQ (RCL_RET_OK, ret) << rcl_get_error_string ().str ;
252+ rcl_reset_error ();
253+
254+ ret = rcl_subscription_fini (&sub2, this ->node_ptr );
255+ EXPECT_EQ (RCL_RET_OK, ret) << rcl_get_error_string ().str ;
256+ rcl_reset_error ();
257+
242258 ret = rcl_publisher_fini (&pub, this ->node_ptr );
243259 EXPECT_EQ (RCL_RET_OK, ret) << rcl_get_error_string ().str ;
244260 rcl_reset_error ();
0 commit comments