Skip to content

Commit

Permalink
return immediately
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
  • Loading branch information
Chen Lihui committed Apr 17, 2023
1 parent d0d9ba3 commit 1c83504
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rcl/test/rcl/test_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -881,9 +881,11 @@ void expect_topics_types(
ret = func(node, topic_name, &nat);
// Ignore the `RCL_RET_NODE_NAME_NON_EXISTENT` result since the discovery may be asynchronous
// that the node information is not updated immediately into the graph cache.
if (ret != RCL_RET_NODE_NAME_NON_EXISTENT) {
ASSERT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;
if (ret == RCL_RET_NODE_NAME_NON_EXISTENT) {
rcl_reset_error();
return;
}
ASSERT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;
rcl_reset_error();
is_success &= num_topics == nat.names.size;
if (expect) {
Expand Down

0 comments on commit 1c83504

Please sign in to comment.