Merge pull request #120 from ros2/reenable_node_get_graph_guard_condition_tests
reenable tests for rcl_node_get_graph_guard_condition for all rmw impl
This commit is contained in:
commit
e86f7a667a
3 changed files with 33 additions and 29 deletions
|
@ -64,10 +64,9 @@ function(test_target_function)
|
|||
)
|
||||
|
||||
set(SKIP_TEST "")
|
||||
# TODO(wjwwood): remove this when the graph API works properly for FastRTPS
|
||||
# TODO(wjwwood): remove this when the graph API works properly for connext dynamic
|
||||
if(
|
||||
rmw_implementation STREQUAL "rmw_connext_dynamic_cpp" OR
|
||||
rmw_implementation STREQUAL "rmw_fastrtps_cpp"
|
||||
rmw_implementation STREQUAL "rmw_connext_dynamic_cpp"
|
||||
)
|
||||
message(STATUS "Skipping test_graph${target_suffix} test.")
|
||||
set(SKIP_TEST "SKIP_TEST")
|
||||
|
|
|
@ -263,7 +263,7 @@ check_graph_state(
|
|||
rcl_reset_error();
|
||||
is_in_tnat = false;
|
||||
for (size_t i = 0; RCL_RET_OK == ret && i < tnat.topic_count; ++i) {
|
||||
if (topic_name == std::string(tnat.topic_names[i])) {
|
||||
if (topic_name == tnat.topic_names[i]) {
|
||||
ASSERT_FALSE(is_in_tnat) << "duplicates in the tnat"; // Found it more than once!
|
||||
is_in_tnat = true;
|
||||
}
|
||||
|
@ -288,6 +288,16 @@ check_graph_state(
|
|||
{
|
||||
printf(" state correct!\n");
|
||||
break;
|
||||
} else {
|
||||
if (expected_publisher_count != publisher_count) {
|
||||
printf(" pub count incorrect!\n");
|
||||
}
|
||||
if (expected_subscriber_count != subscriber_count) {
|
||||
printf(" sub count incorrect!\n");
|
||||
}
|
||||
if (expected_in_tnat != is_in_tnat) {
|
||||
printf(" in tnat incorrect!\n");
|
||||
}
|
||||
}
|
||||
// Wait for graph change before trying again.
|
||||
if ((i + 1) == number_of_tries) {
|
||||
|
|
|
@ -272,10 +272,6 @@ TEST_F(CLASSNAME(TestNodeFixture, RMW_IMPLEMENTATION), test_rcl_node_accessors)
|
|||
stop_memory_checking();
|
||||
EXPECT_NE(0u, instance_id);
|
||||
// Test rcl_node_get_graph_guard_condition
|
||||
std::string rmw_id(rmw_get_implementation_identifier());
|
||||
if (rmw_id.find("opensplice") != std::string::npos) {
|
||||
// Only test with opensplice for now, as connext and fastrtps are not working.
|
||||
// TODO(wjwwood): remove this check when more middlewares implement this
|
||||
const rcl_guard_condition_t * graph_guard_condition = nullptr;
|
||||
graph_guard_condition = rcl_node_get_graph_guard_condition(nullptr);
|
||||
EXPECT_EQ(nullptr, graph_guard_condition);
|
||||
|
@ -296,7 +292,6 @@ TEST_F(CLASSNAME(TestNodeFixture, RMW_IMPLEMENTATION), test_rcl_node_accessors)
|
|||
assert_no_free_end();
|
||||
stop_memory_checking();
|
||||
EXPECT_NE(nullptr, graph_guard_condition);
|
||||
}
|
||||
}
|
||||
|
||||
/* Tests the node life cycle, including rcl_node_init() and rcl_node_fini().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue