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

Fix unit test on build farm for new service functions #49

Closed
JanStaschulat opened this issue Feb 16, 2021 · 6 comments · Fixed by #53
Closed

Fix unit test on build farm for new service functions #49

JanStaschulat opened this issue Feb 16, 2021 · 6 comments · Fixed by #53
Assignees

Comments

@JanStaschulat
Copy link
Contributor

JanStaschulat commented Feb 16, 2021

@norro
Hi Arne, could you have a look, why these unit tests with services fail?
https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/71/#showFailuresLink

Option A)

  • you could use this PR for the fix: Fix ci-job for Dashing #46
  • that means to create a branch based on micro-ros/rclc:master and then
  • create a PR to micro-ros/rclc:master.
  • then these changes will be considered in the PR.

Option B)

@JanStaschulat
Copy link
Contributor Author

JanStaschulat commented Feb 16, 2021

@norro: The expected sequence id is 1, however the returned sequence id is different in each unit test on the build farm. Strange, but as this is not part of the executor functionality, but an RCL/RMW issue, I would propose to omit this ASSERT in all relevant unit_tests with services/clients:

EXPECT_EQ(seq, (int64_t) 1); // sequence id = 1

@norro
Copy link
Collaborator

norro commented Feb 17, 2021

Agreed, I wouldn't have a clue how to resolve this.
Should we / can we report an issue upstream (in rcl/rmw) to have this fixed upstream?

@JanStaschulat
Copy link
Contributor Author

Yes, that is a good idea. you could also point out, that it is only an issue on the build farm and not in a normal colcon test with Github Action.

@norro
Copy link
Collaborator

norro commented Feb 19, 2021

@JanStaschulat Could you please write the upstream issue in rcl/rmw? I don't have enough knowledge of rcl/rmw to be able to phrase the issue, I'm afraid.
After the issue is created, I suggest to close this issue.

@JanStaschulat
Copy link
Contributor Author

JanStaschulat commented Feb 22, 2021

@norro created the issue ros2/rcl#892. I would keep this issue open, because I referenced it in the ros2/rcl issue.

@JanStaschulat
Copy link
Contributor Author

JanStaschulat commented Feb 22, 2021

@norro. As explained in the issue ros2/rcl#892, the specification of rcl_send_request does not say to which value seq_id is initialized to. It is only guaranteed to be unique.

Therefore we can not check this value (even though it seems to be always "1" for Dashing and Foxy). So we can keep the unit test the way they are. I will remove these commented out lines. Then we can close this issue.

JanStaschulat added a commit to micro-ROS/rclc that referenced this issue Feb 23, 2021
@norro norro linked a pull request Feb 23, 2021 that will close this issue
BrettRD pushed a commit to BrettRD/rclc that referenced this issue Jul 5, 2021
Signed-off-by: Jan Staschulat <[email protected]>
Signed-off-by: BrettRD <[email protected]>
JanStaschulat added a commit to micro-ROS/rclc that referenced this issue Aug 10, 2021
JanStaschulat added a commit to micro-ROS/rclc that referenced this issue Aug 10, 2021
JanStaschulat added a commit to micro-ROS/rclc that referenced this issue Aug 10, 2021
JanStaschulat added a commit to micro-ROS/rclc that referenced this issue Aug 19, 2021
JanStaschulat added a commit to micro-ROS/rclc that referenced this issue Aug 19, 2021
JanStaschulat added a commit that referenced this issue Aug 19, 2021
* Adds service callback with service context

Adds an additional callback type and handling that allows passing
additional service context (void *) to a service callback.

#35

Signed-off-by: Arne Nordmann <[email protected]>

* Fixed service callback handling

Signed-off-by: Arne Nordmann <[email protected]>

* Adds user API and tests

* Adds user API to add service with additional context
* Tests (copied and adapted from service with request id tests)

Signed-off-by: Arne Nordmann <[email protected]>

* Proper tear-down of msgs

Signed-off-by: Arne Nordmann <[email protected]>

* Fixes service call with context tests

Signed-off-by: Arne Nordmann <[email protected]>

* Adds service callbacks to lifecycle node

Declares service callbacks for lifecycle services: get state and get available states

micro-ROS#40

Signed-off-by: Arne Nordmann <[email protected]>

* Adds callback for GetState service

micro-ROS#40

Signed-off-by: Arne Nordmann <[email protected]>

* Provide GetAvailableStates service

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Example lifecycle node proides services

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Implemented ChangeState service

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Linting, documentation, example

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49

* Cmake linting

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Adds missing declaration of callbacks

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Pre-initialize all strings

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Lifecycle services working

* Functions to initialize lifecycle services for nodes
* Exemplary lifecycle nodes with services

micro-ROS#40

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Tests for service initialization

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49

Signed-off-by: Jan Staschulat <[email protected]>

* commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49

Signed-off-by: Jan Staschulat <[email protected]>

* Ignoring unsuccessful SERVICE_TAKE (#175)

* resolved bug by ignoring RCL_RET_SERVICE_TAKE_FAILED

Signed-off-by: Jan Staschulat <[email protected]>

* data_available has to be reset to false, if rcl_take fails - this needs to be updated for subscriptions as well.

Signed-off-by: Jan Staschulat <[email protected]>

* Fixes init and cleanup

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49

Signed-off-by: Jan Staschulat <[email protected]>

Co-authored-by: Jan Staschulat <[email protected]>
mergify bot pushed a commit that referenced this issue Aug 19, 2021
* Adds service callback with service context

Adds an additional callback type and handling that allows passing
additional service context (void *) to a service callback.

#35

Signed-off-by: Arne Nordmann <[email protected]>

* Fixed service callback handling

Signed-off-by: Arne Nordmann <[email protected]>

* Adds user API and tests

* Adds user API to add service with additional context
* Tests (copied and adapted from service with request id tests)

Signed-off-by: Arne Nordmann <[email protected]>

* Proper tear-down of msgs

Signed-off-by: Arne Nordmann <[email protected]>

* Fixes service call with context tests

Signed-off-by: Arne Nordmann <[email protected]>

* Adds service callbacks to lifecycle node

Declares service callbacks for lifecycle services: get state and get available states

micro-ROS#40

Signed-off-by: Arne Nordmann <[email protected]>

* Adds callback for GetState service

micro-ROS#40

Signed-off-by: Arne Nordmann <[email protected]>

* Provide GetAvailableStates service

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Example lifecycle node proides services

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Implemented ChangeState service

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Linting, documentation, example

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49

* Cmake linting

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Adds missing declaration of callbacks

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Pre-initialize all strings

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Lifecycle services working

* Functions to initialize lifecycle services for nodes
* Exemplary lifecycle nodes with services

micro-ROS#40

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Tests for service initialization

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49

Signed-off-by: Jan Staschulat <[email protected]>

* commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49

Signed-off-by: Jan Staschulat <[email protected]>

* Ignoring unsuccessful SERVICE_TAKE (#175)

* resolved bug by ignoring RCL_RET_SERVICE_TAKE_FAILED

Signed-off-by: Jan Staschulat <[email protected]>

* data_available has to be reset to false, if rcl_take fails - this needs to be updated for subscriptions as well.

Signed-off-by: Jan Staschulat <[email protected]>

* Fixes init and cleanup

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49

Signed-off-by: Jan Staschulat <[email protected]>

Co-authored-by: Jan Staschulat <[email protected]>
(cherry picked from commit 865b02b)
mergify bot pushed a commit that referenced this issue Aug 19, 2021
* Adds service callback with service context

Adds an additional callback type and handling that allows passing
additional service context (void *) to a service callback.

#35

Signed-off-by: Arne Nordmann <[email protected]>

* Fixed service callback handling

Signed-off-by: Arne Nordmann <[email protected]>

* Adds user API and tests

* Adds user API to add service with additional context
* Tests (copied and adapted from service with request id tests)

Signed-off-by: Arne Nordmann <[email protected]>

* Proper tear-down of msgs

Signed-off-by: Arne Nordmann <[email protected]>

* Fixes service call with context tests

Signed-off-by: Arne Nordmann <[email protected]>

* Adds service callbacks to lifecycle node

Declares service callbacks for lifecycle services: get state and get available states

micro-ROS#40

Signed-off-by: Arne Nordmann <[email protected]>

* Adds callback for GetState service

micro-ROS#40

Signed-off-by: Arne Nordmann <[email protected]>

* Provide GetAvailableStates service

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Example lifecycle node proides services

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Implemented ChangeState service

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Linting, documentation, example

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49

* Cmake linting

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Adds missing declaration of callbacks

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Pre-initialize all strings

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Lifecycle services working

* Functions to initialize lifecycle services for nodes
* Exemplary lifecycle nodes with services

micro-ROS#40

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Tests for service initialization

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49

Signed-off-by: Jan Staschulat <[email protected]>

* commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49

Signed-off-by: Jan Staschulat <[email protected]>

* Ignoring unsuccessful SERVICE_TAKE (#175)

* resolved bug by ignoring RCL_RET_SERVICE_TAKE_FAILED

Signed-off-by: Jan Staschulat <[email protected]>

* data_available has to be reset to false, if rcl_take fails - this needs to be updated for subscriptions as well.

Signed-off-by: Jan Staschulat <[email protected]>

* Fixes init and cleanup

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49

Signed-off-by: Jan Staschulat <[email protected]>

Co-authored-by: Jan Staschulat <[email protected]>
(cherry picked from commit 865b02b)

# Conflicts:
#	rclc_lifecycle/src/rclc_lifecycle/rclc_lifecycle.c
#	rclc_lifecycle/test/test_lifecycle.cpp
JanStaschulat pushed a commit that referenced this issue Aug 19, 2021
* Adds service callback with service context

Adds an additional callback type and handling that allows passing
additional service context (void *) to a service callback.

#35

Signed-off-by: Arne Nordmann <[email protected]>

* Fixed service callback handling

Signed-off-by: Arne Nordmann <[email protected]>

* Adds user API and tests

* Adds user API to add service with additional context
* Tests (copied and adapted from service with request id tests)

Signed-off-by: Arne Nordmann <[email protected]>

* Proper tear-down of msgs

Signed-off-by: Arne Nordmann <[email protected]>

* Fixes service call with context tests

Signed-off-by: Arne Nordmann <[email protected]>

* Adds service callbacks to lifecycle node

Declares service callbacks for lifecycle services: get state and get available states

micro-ROS#40

Signed-off-by: Arne Nordmann <[email protected]>

* Adds callback for GetState service

micro-ROS#40

Signed-off-by: Arne Nordmann <[email protected]>

* Provide GetAvailableStates service

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Example lifecycle node proides services

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Implemented ChangeState service

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Linting, documentation, example

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49

* Cmake linting

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Adds missing declaration of callbacks

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Pre-initialize all strings

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Lifecycle services working

* Functions to initialize lifecycle services for nodes
* Exemplary lifecycle nodes with services

micro-ROS#40

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* Tests for service initialization

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49

Signed-off-by: Jan Staschulat <[email protected]>

* commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49

Signed-off-by: Jan Staschulat <[email protected]>

* Ignoring unsuccessful SERVICE_TAKE (#175)

* resolved bug by ignoring RCL_RET_SERVICE_TAKE_FAILED

Signed-off-by: Jan Staschulat <[email protected]>

* data_available has to be reset to false, if rcl_take fails - this needs to be updated for subscriptions as well.

Signed-off-by: Jan Staschulat <[email protected]>

* Fixes init and cleanup

Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>

* commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49

Signed-off-by: Jan Staschulat <[email protected]>

Co-authored-by: Jan Staschulat <[email protected]>
(cherry picked from commit 865b02b)

Co-authored-by: Arne Nordmann <[email protected]>
MiguelCompany pushed a commit to eProsima/rclc that referenced this issue Jun 6, 2023
* goal_state is int, NULL check results in compiler warning (comparing int with pointer), removed this check.

* resolving bug for unit test on Eloquent. rcl_node_fini was not called at the end of unit tests, this created the error, that node was still initialized in next unit test.

* fixed unit test failures for Dashing. node and other objects were not properly cleaned up with _fini methods, in next unit test the same node was used again. Added clean-up code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants