Skip to content

Commit

Permalink
Reduce the internal timeouts
Browse files Browse the repository at this point in the history
Debugging #611 these timeouts were so long that the overall test timeout was being triggered before these internal timeouts were triggered.

1000 retries at 100ms -> 10 seconds each. I cut it down to 1 second for each to establish the connection.

Signed-off-by: Tully Foote <[email protected]>
  • Loading branch information
tfoote committed Apr 9, 2020
1 parent 6ca6545 commit 5912a2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rcl/test/rcl/client_fixture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ int main(int argc, char ** argv)
});

// Wait until server is available
if (!wait_for_server_to_be_available(&node, &client, 1000, 100)) {
if (!wait_for_server_to_be_available(&node, &client, 10, 100)) {
RCUTILS_LOG_ERROR_NAMED(ROS_PACKAGE_NAME, "Server never became available");
return -1;
}
Expand Down Expand Up @@ -214,7 +214,7 @@ int main(int argc, char ** argv)
memset(&client_response, 0, sizeof(test_msgs__srv__BasicTypes_Response));
test_msgs__srv__BasicTypes_Response__init(&client_response);

if (!wait_for_client_to_be_ready(&client, &context, 1000, 100)) {
if (!wait_for_client_to_be_ready(&client, &context, 10, 100)) {
RCUTILS_LOG_ERROR_NAMED(ROS_PACKAGE_NAME, "Client never became ready");
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion rcl/test/rcl/service_fixture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ int main(int argc, char ** argv)

// Block until a client request comes in.

if (!wait_for_service_to_be_ready(&service, &context, 1000, 100)) {
if (!wait_for_service_to_be_ready(&service, &context, 10, 100)) {
RCUTILS_LOG_ERROR_NAMED(ROS_PACKAGE_NAME, "Service never became ready");
return -1;
}
Expand Down

0 comments on commit 5912a2c

Please sign in to comment.