From fc3f93bd792ae467d26d6581da54158328dcd111 Mon Sep 17 00:00:00 2001 From: Andrea Sorbini Date: Fri, 12 Mar 2021 06:12:03 -0800 Subject: [PATCH] Don't expect RCL_RET_TIMEOUT to set an error string (#900) Signed-off-by: Andrea Sorbini --- rcl_action/test/rcl_action/test_action_communication.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rcl_action/test/rcl_action/test_action_communication.cpp b/rcl_action/test/rcl_action/test_action_communication.cpp index 2da45d97e..7f59fc333 100644 --- a/rcl_action/test/rcl_action/test_action_communication.cpp +++ b/rcl_action/test/rcl_action/test_action_communication.cpp @@ -1148,8 +1148,11 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_valid_feedba ret = rcl_wait(&this->wait_set, RCL_S_TO_NS(10)); if (RCL_RET_OK != ret) { - EXPECT_TRUE(rcl_error_is_set()); - rcl_reset_error(); + // All non-OK retcodes should set an error string, except RCL_RET_TIMEOUT. + if (RCL_RET_TIMEOUT != ret) { + EXPECT_TRUE(rcl_error_is_set()); + rcl_reset_error(); + } continue; }