From 8075b9c65ec093f9f2bb1fb93d8ebf8fb97e21c1 Mon Sep 17 00:00:00 2001 From: Andrea Sorbini Date: Thu, 11 Mar 2021 21:25:56 -0800 Subject: [PATCH] Don't expect RCL_RET_TIMEOUT to set an error string 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; }