-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add fault injection tests to construction/destruction APIs. #144
Conversation
6ad410c
to
8211835
Compare
rmw_client_t * client = | ||
rmw_create_client(node, ts, service_name, &rmw_qos_profile_default); | ||
if (client) { | ||
int64_t count = rcutils_fault_injection_get_count(); |
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.
Pausing the fault_injection happens a lot in these tests. If there isn't time to create a more obvious function call or macro, I would add a comment here so it's more clear why this is being done. Here and in the cases below.
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.
Alright, let's add it. I have to re-release rmw_fastrtps
anyways, adding rcutils
to the queue won't hurt.
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.
See ros2/rcutils#295. I'll adapt this PR.
Signed-off-by: Michel Hidalgo <[email protected]>
Signed-off-by: Michel Hidalgo <[email protected]>
5ebb778
to
7c8618d
Compare
ROSIDL_GET_SRV_TYPE_SUPPORT(test_msgs, srv, BasicTypes); | ||
RCUTILS_FAULT_INJECTION_TEST( | ||
{ | ||
int64_t count = rcutils_fault_injection_get_count(); |
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 is missing RCUTILS_NO_FAULT_INJECTION
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.
Argh, thought I had covered them all. See 7309204.
{ | ||
constexpr char node_name[] = "my_node"; | ||
constexpr char node_namespace[] = "/my_ns"; | ||
int64_t count = rcutils_fault_injection_get_count(); |
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.
Same here
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.
See 7309204.
rmw_publisher_t * pub = | ||
rmw_create_publisher(node, ts, topic_name, &rmw_qos_profile_default, &options); | ||
if (pub) { | ||
int64_t count = rcutils_fault_injection_get_count(); |
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.
Same
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.
See 7309204.
Signed-off-by: Michel Hidalgo <[email protected]>
0ec4a9b
to
7309204
Compare
Signed-off-by: Michel Hidalgo <[email protected]>
Hmm, CI failures appear to be coming from a different thread. I'll dig in. |
CI again after ros2/rmw_fastrtps#458: |
@ros-pull-request-builder retest this please |
1 similar comment
@ros-pull-request-builder retest this please |
All green ! Going in. |
Signed-off-by: Michel Hidalgo <[email protected]>
Signed-off-by: Michel Hidalgo <[email protected]>
This pull requests aims to add fault injections tests for most if not all
rmw
APIs.