Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spin before checking if ros time is active #483

Merged
merged 1 commit into from
May 30, 2018

Conversation

sloretz
Copy link
Contributor

@sloretz sloretz commented May 30, 2018

This is a fix for a possible cause of a test failure described by this comment.

During the test the ros_clock->ros_time_is_active() method is expected to return false, but sometimes it returns true. "Ros Time" on a clock is activated or deactivated in a subscription callback on the parameter_events topic. A SyncParametersClient calls spin_node_until_future_complete with an std::shared_future that completes when a response to a request to set parameters has been received. It looks like it is possible for the client response to be received before the parameter_events subscription callback is called.

Without this PR I see a test failure on my ubuntu xenial machine ~50% of the time using --retest-until-fail 100. With this PR --retest-until-fail 1800 completed without failing.

I don't know why the change in #478 made this test flaky.

CI (only test rclcpp since only code change is in a test)

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@sloretz sloretz added the in review Waiting for review (Kanban column) label May 30, 2018
@sloretz sloretz self-assigned this May 30, 2018
@sloretz sloretz merged commit 4efcd33 into master May 30, 2018
@sloretz sloretz deleted the race_condition_time_source_test branch May 30, 2018 22:09
nnmm pushed a commit to ApexAI/rclcpp that referenced this pull request Jul 9, 2022
…s2#483)

* Support rcl_params_t copies.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Parse parameter overrides from command line.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Parameter overrides' tests passing.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Test rcl_yaml_node_struct_copy() function

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Export rcl_yaml_param_parser as rcl dependency.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Zero initialize parameter overrides before rcl arguments copy.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Initialize local variables early enough.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Simplify rcl package.xml

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Assert arguments sanity in rcl args parsing internal functions.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Extend rcl_yaml_param_parser tests to all parameter types.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Address peer review comments.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Support --remap/-r flags.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Please cpplint

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
DensoADAS pushed a commit to DensoADAS/rclcpp that referenced this pull request Aug 5, 2022
* add negative check to init py

Signed-off-by: Jesse Ikawa <jikawa@amazon.com>

* add unit test

Signed-off-by: Jesse Ikawa <jikawa@amazon.com>

* modify unit test

Signed-off-by: Jesse Ikawa <jikawa@amazon.com>

* revert test_play

Signed-off-by: Jesse Ikawa <jikawa@amazon.com>

* typo string to int

Signed-off-by: Jesse Ikawa <jikawa@amazon.com>

* add history value to unit tests

Signed-off-by: Jesse Ikawa <jikawa@amazon.com>

* add validation to duration keys

Signed-off-by: Jesse Ikawa <jikawa@amazon.com>

* modify duration validation

Signed-off-by: Jesse Ikawa <jikawa@amazon.com>

* fix syntax

Signed-off-by: Jesse Ikawa <jikawa@amazon.com>

* modify duration validation

Signed-off-by: Jesse Ikawa <jikawa@amazon.com>

* fix syntax

Signed-off-by: Jesse Ikawa <jikawa@amazon.com>

* modify comparison

Signed-off-by: Jesse Ikawa <jikawa@amazon.com>

* fix syntax

Signed-off-by: Jesse Ikawa <jikawa@amazon.com>

* modify style

Signed-off-by: Jesse Ikawa <jikawa@amazon.com>

* modify style

Signed-off-by: Jesse Ikawa <jikawa@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in review Waiting for review (Kanban column)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants