Skip to content

Add delay when retrying tests involving the CLI daemon#459

Merged
jacobperron merged 1 commit intomasterfrom
jacob/retry_delay
Feb 27, 2020
Merged

Add delay when retrying tests involving the CLI daemon#459
jacobperron merged 1 commit intomasterfrom
jacob/retry_delay

Conversation

@jacobperron
Copy link
Copy Markdown
Member

@jacobperron jacobperron commented Feb 25, 2020

This is to give time for discovery to happen between the daemon node and the test fixture nodes.

Alternative to #454

Depends on ros2/launch#390

@jacobperron jacobperron self-assigned this Feb 25, 2020
@jacobperron jacobperron added the enhancement New feature or request label Feb 25, 2020
Copy link
Copy Markdown
Member

@wjwwood wjwwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

A little theory behind this change, even if you ensure the fixure is setup (similar to what was proposed in #454) you are still racing the discovery. Even if, in the case of ros2 action info tests, you created a client and waited for the server to be "available" it may not appear available to the daemon until after that. Also, you have to wait for the client you used to check this to disappear (another discovery race).

In this solution it will finish immediately if the discovery is "immediate", but will be robust to some discovery delays with the daemon (on the order of 5 seconds in most cases). Before this change, the reties happened quickly, so not much time was given to wait for discovery delays to be resolved.

This is to give time for discovery to happen between the daemon node and the test fixture nodes.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron
Copy link
Copy Markdown
Member Author

rebased on master. CI is here: ros2/launch#390 (comment)

@jacobperron jacobperron merged commit 09b1528 into master Feb 27, 2020
@delete-merged-branch delete-merged-branch bot deleted the jacob/retry_delay branch February 27, 2020 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants