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

Add parallel callback test #1044

Merged

Conversation

Flova
Copy link
Contributor

@Flova Flova commented Nov 18, 2022

Following up on the suggestion in #1039, this pull request adds a test case which checks if the parallel processing of callback is working when the reentrant callback group and the multithreaded executor are used. This behavior was broken recently, and the test should ensure that future regressions are noticed.

The test case is based on the reproduction example from #1039. I put it together with the callback group test cases, but we could put it somewhere else.

@Flova
Copy link
Contributor Author

Flova commented Nov 18, 2022

@fujitatomoya ping :)

Signed-off-by: Florian Vahl <florian@flova.de>
@Flova Flova force-pushed the add_reentrant_group_blocking_test branch from f8ac216 to d2d1928 Compare November 18, 2022 10:29
Signed-off-by: Florian Vahl <florian@flova.de>
@fujitatomoya fujitatomoya self-assigned this Nov 29, 2022
Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

overall lgtm, a couple of minor comments.

rclpy/test/test_callback_group.py Outdated Show resolved Hide resolved
rclpy/test/test_callback_group.py Outdated Show resolved Hide resolved
@fujitatomoya
Copy link
Collaborator

CI:

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

Signed-off-by: Florian Vahl <florian@flova.de>
@Flova Flova force-pushed the add_reentrant_group_blocking_test branch from f109a1e to ff4a53e Compare November 29, 2022 15:28
…es the test.

Signed-off-by: Florian Vahl <florian@flova.de>
@Flova
Copy link
Contributor Author

Flova commented Nov 29, 2022

@fujitatomoya I added your suggestions.

@fujitatomoya
Copy link
Collaborator

@adityapande-1995 can you review this?

@adityapande-1995 adityapande-1995 merged commit 40054ba into ros2:rolling Dec 2, 2022
@Flova Flova deleted the add_reentrant_group_blocking_test branch December 2, 2022 09:32
@fujitatomoya
Copy link
Collaborator

@Mergifyio backport to humble

mergify bot pushed a commit that referenced this pull request Dec 2, 2022
* Add parallel callback test
Signed-off-by: Florian Vahl <florian@flova.de>
(cherry picked from commit 40054ba)
@mergify
Copy link

mergify bot commented Dec 2, 2022

backport to humble

✅ Backports have been created

fujitatomoya pushed a commit that referenced this pull request Dec 22, 2022
* Add parallel callback test
Signed-off-by: Florian Vahl <florian@flova.de>
(cherry picked from commit 40054ba)

Co-authored-by: Florian Vahl <florian@flova.de>
iuhilnehc-ynos pushed a commit to iuhilnehc-ynos/rclpy that referenced this pull request Apr 10, 2023
* Add parallel callback test
Signed-off-by: Florian Vahl <florian@flova.de>
(cherry picked from commit 40054ba)

Co-authored-by: Florian Vahl <florian@flova.de>
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
iuhilnehc-ynos pushed a commit to iuhilnehc-ynos/rclpy that referenced this pull request Apr 10, 2023
* Add parallel callback test
Signed-off-by: Florian Vahl <florian@flova.de>
(cherry picked from commit 40054ba)

Co-authored-by: Florian Vahl <florian@flova.de>
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
iuhilnehc-ynos pushed a commit to iuhilnehc-ynos/rclpy that referenced this pull request Apr 10, 2023
* Add parallel callback test
Signed-off-by: Florian Vahl <florian@flova.de>
(cherry picked from commit 40054ba)

Co-authored-by: Florian Vahl <florian@flova.de>
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
Barry-Xu-2018 pushed a commit to Barry-Xu-2018/rclpy that referenced this pull request Apr 10, 2023
* Add parallel callback test
Signed-off-by: Florian Vahl <florian@flova.de>
(cherry picked from commit 40054ba)

Co-authored-by: Florian Vahl <florian@flova.de>
Signed-off-by: Barry Xu <barry.xu@sony.com>
fujitatomoya added a commit that referenced this pull request Apr 12, 2023
* Add parallel callback test (#1044) (#1052)

* Add parallel callback test
Signed-off-by: Florian Vahl <florian@flova.de>
(cherry picked from commit 40054ba)

Co-authored-by: Florian Vahl <florian@flova.de>
Signed-off-by: Barry Xu <barry.xu@sony.com>

* decorator should not be callable. (#1050) (#1051)

#1047

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
(cherry picked from commit 2da35a4)

Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>

* 3.3.6

Signed-off-by: Audrow Nash <audrow@openrobotics.org>
Signed-off-by: Barry Xu <barry.xu@sony.com>

* Fix `test_publisher` linter for pydocstyle 6.2.2 (backport #1063) (#1066)

Co-authored-by: Cristóbal Arroyo <69475004+Crola1702@users.noreply.github.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>

* 3.3.7

Signed-off-by: Audrow Nash <audrow@openrobotics.org>
Signed-off-by: Barry Xu <barry.xu@sony.com>

* Fix #983 by saving future and checking for + raising any exceptions (#1073) (#1088)

* Fix #983 by saving future and checking for + raising any exceptions

Signed-off-by: Achille Verheye <achille.verheye@gmail.com>
Co-authored-by: Achille Verheye <achille.verheye@gmail.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>

* Deal with ParameterUninitializedException for parameter service (#1033)

* Deal with ParameterUninitializedException for parameter service

Signed-off-by: Barry Xu <barry.xu@sony.com>

* Enable all tests in test_parameter_client.py

Signed-off-by: Barry Xu <barry.xu@sony.com>

* Get empty value for ParameterUninitializedException

Signed-off-by: Barry Xu <barry.xu@sony.com>

Signed-off-by: Barry Xu <barry.xu@sony.com>
(cherry picked from commit e442ad2)

# Conflicts:
#	rclpy/test/test_parameter_client.py
Signed-off-by: Barry Xu <barry.xu@sony.com>

* Fix conflict and use new testcase (#1053)

Signed-off-by: Barry Xu <barry.xu@sony.com>

* Changed for filename with alphabet order

Signed-off-by: Barry Xu <barry.xu@sony.com>

---------

Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Audrow Nash <audrow@openrobotics.org>
Signed-off-by: Achille Verheye <achille.verheye@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Florian Vahl <florian@flova.de>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Co-authored-by: Audrow Nash <audrow@openrobotics.org>
Co-authored-by: Cristóbal Arroyo <69475004+Crola1702@users.noreply.github.com>
Co-authored-by: Achille Verheye <achille.verheye@gmail.com>
fujitatomoya added a commit that referenced this pull request Apr 21, 2023
* Add parallel callback test (#1044) (#1052)

* Add parallel callback test
Signed-off-by: Florian Vahl <florian@flova.de>
(cherry picked from commit 40054ba)

Co-authored-by: Florian Vahl <florian@flova.de>
Signed-off-by: Barry Xu <barry.xu@sony.com>

* decorator should not be callable. (#1050) (#1051)

#1047

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
(cherry picked from commit 2da35a4)

Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>

* 3.3.6

Signed-off-by: Audrow Nash <audrow@openrobotics.org>
Signed-off-by: Barry Xu <barry.xu@sony.com>

* Fix `test_publisher` linter for pydocstyle 6.2.2 (backport #1063) (#1066)

Co-authored-by: Cristóbal Arroyo <69475004+Crola1702@users.noreply.github.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>

* 3.3.7

Signed-off-by: Audrow Nash <audrow@openrobotics.org>
Signed-off-by: Barry Xu <barry.xu@sony.com>

* Fix #983 by saving future and checking for + raising any exceptions (#1073) (#1088)

* Fix #983 by saving future and checking for + raising any exceptions

Signed-off-by: Achille Verheye <achille.verheye@gmail.com>
Co-authored-by: Achille Verheye <achille.verheye@gmail.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>

* Deal with ParameterUninitializedException for parameter service (#1033)

* Deal with ParameterUninitializedException for parameter service

Signed-off-by: Barry Xu <barry.xu@sony.com>

* Enable all tests in test_parameter_client.py

Signed-off-by: Barry Xu <barry.xu@sony.com>

* Get empty value for ParameterUninitializedException

Signed-off-by: Barry Xu <barry.xu@sony.com>

Signed-off-by: Barry Xu <barry.xu@sony.com>
(cherry picked from commit e442ad2)

# Conflicts:
#	rclpy/test/test_parameter_client.py
Signed-off-by: Barry Xu <barry.xu@sony.com>

* Fix conflict and use new testcase (#1053)

Signed-off-by: Barry Xu <barry.xu@sony.com>

* Changed for filename with alphabet order

Signed-off-by: Barry Xu <barry.xu@sony.com>

---------

Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Audrow Nash <audrow@openrobotics.org>
Signed-off-by: Achille Verheye <achille.verheye@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Florian Vahl <florian@flova.de>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Co-authored-by: Audrow Nash <audrow@openrobotics.org>
Co-authored-by: Cristóbal Arroyo <69475004+Crola1702@users.noreply.github.com>
Co-authored-by: Achille Verheye <achille.verheye@gmail.com>
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 this pull request may close these issues.

None yet

3 participants