reenable tests for rcl_node_get_graph_guard_condition for all rmw impl
This commit is contained in:
parent
e1bfa26cea
commit
283e476c26
1 changed files with 20 additions and 25 deletions
|
@ -272,31 +272,26 @@ TEST_F(CLASSNAME(TestNodeFixture, RMW_IMPLEMENTATION), test_rcl_node_accessors)
|
||||||
stop_memory_checking();
|
stop_memory_checking();
|
||||||
EXPECT_NE(0u, instance_id);
|
EXPECT_NE(0u, instance_id);
|
||||||
// Test rcl_node_get_graph_guard_condition
|
// Test rcl_node_get_graph_guard_condition
|
||||||
std::string rmw_id(rmw_get_implementation_identifier());
|
const rcl_guard_condition_t * graph_guard_condition = nullptr;
|
||||||
if (rmw_id.find("opensplice") != std::string::npos) {
|
graph_guard_condition = rcl_node_get_graph_guard_condition(nullptr);
|
||||||
// Only test with opensplice for now, as connext and fastrtps are not working.
|
EXPECT_EQ(nullptr, graph_guard_condition);
|
||||||
// TODO(wjwwood): remove this check when more middlewares implement this
|
rcl_reset_error();
|
||||||
const rcl_guard_condition_t * graph_guard_condition = nullptr;
|
graph_guard_condition = rcl_node_get_graph_guard_condition(&zero_node);
|
||||||
graph_guard_condition = rcl_node_get_graph_guard_condition(nullptr);
|
EXPECT_EQ(nullptr, graph_guard_condition);
|
||||||
EXPECT_EQ(nullptr, graph_guard_condition);
|
rcl_reset_error();
|
||||||
rcl_reset_error();
|
graph_guard_condition = rcl_node_get_graph_guard_condition(&invalid_node);
|
||||||
graph_guard_condition = rcl_node_get_graph_guard_condition(&zero_node);
|
EXPECT_EQ(nullptr, graph_guard_condition);
|
||||||
EXPECT_EQ(nullptr, graph_guard_condition);
|
rcl_reset_error();
|
||||||
rcl_reset_error();
|
start_memory_checking();
|
||||||
graph_guard_condition = rcl_node_get_graph_guard_condition(&invalid_node);
|
assert_no_malloc_begin();
|
||||||
EXPECT_EQ(nullptr, graph_guard_condition);
|
assert_no_realloc_begin();
|
||||||
rcl_reset_error();
|
assert_no_free_begin();
|
||||||
start_memory_checking();
|
graph_guard_condition = rcl_node_get_graph_guard_condition(&node);
|
||||||
assert_no_malloc_begin();
|
assert_no_malloc_end();
|
||||||
assert_no_realloc_begin();
|
assert_no_realloc_end();
|
||||||
assert_no_free_begin();
|
assert_no_free_end();
|
||||||
graph_guard_condition = rcl_node_get_graph_guard_condition(&node);
|
stop_memory_checking();
|
||||||
assert_no_malloc_end();
|
EXPECT_NE(nullptr, graph_guard_condition);
|
||||||
assert_no_realloc_end();
|
|
||||||
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().
|
/* Tests the node life cycle, including rcl_node_init() and rcl_node_fini().
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue