-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Porting more tests to tf2_ros #202
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, good work on porting more tests! That's awesome.
I've got a couple of things that I think should be fixed in here, then we can run CI on it.
a1061ab
to
b822db3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more comments. Most of them are minor, so once those are fixed I would suggest running CI.
tf2_ros/test/listener_unittest.cpp
Outdated
double x, y, z; | ||
generate_rand_numbers(x, y, z); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honest question: is it any better to generate random numbers rather than just hardcode some values for x, y, and z?
tf2_ros/test/test_buffer_client.cpp
Outdated
std::bind(&MockBufferServer::handle_accepted, this, std::placeholders::_1)); | ||
} | ||
|
||
void handle_accepted(const std::shared_ptr<GoalHandle> goal_handle) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nit: all of the other methods in here are camelCase, I think this should be handleAccepted
.
tf2_ros/test/time_reset_test.cpp
Outdated
{ | ||
rclcpp::Rate r(10); | ||
rclcpp::spin_some(node); | ||
for (uint8_t i = 0; i < 10; ++i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really doesn't matter at all here, but for future reference an int
loop counter will be more efficient than a uint8_t
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's one syntax error in here. There also seem to be some failing tests in CI that need to be fixed. Once those are fixed, this looks good to go.
43b135e
to
8227c1b
Compare
I have commented the test_buffer_client.py because for some reason is not working in the CI. This error is happening because is not able to find the action server but the mock should created it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've got two more small things to change, then I think we can go forward with this. I'll approve once those are fixed.
Can you please open an issue to track the test_buffer_client.py
failures?
Issue created #212 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue created #212
Thanks! Looks good to me now, thanks for iterating. Before these last two changes, it looks like you had green CI, so I'll just suggest you re-run the tests locally and ensure they all pass. With that, I think we are good to merge.
Thanks for the review @clalancette ! |
* Added more tests to tf2_ros * improving tf2_ros time_reset_test * tf2_ros fixed failed test_buffer_client.cpp * added some EXPECT to listener unittest * reviews * Update listener_unittest.cpp * fixed tf2_ros time_reset_test * tf2_ros removed ROS launch files * Added TODO to fix test_buffer_client in CI * tf2_ros added feedback
* Added more tests to tf2_ros * improving tf2_ros time_reset_test * tf2_ros fixed failed test_buffer_client.cpp * added some EXPECT to listener unittest * reviews * Update listener_unittest.cpp * fixed tf2_ros time_reset_test * tf2_ros removed ROS launch files * Added TODO to fix test_buffer_client in CI * tf2_ros added feedback
Porting more tests to tf2_ros