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 test_ros_loader.py #644

Merged
merged 2 commits into from
Dec 10, 2021
Merged

Conversation

kenji-miyake
Copy link
Contributor

@kenji-miyake kenji-miyake commented Sep 24, 2021

Public Changes

None

Description

Fixed test_ros_loader.py to pass the tests.

$ colcon test --event-handlers console_cohesion+ --packages-select rosbridge_library
Starting >>> rosbridge_library
--- output: rosbridge_library                   
UpdateCTestConfiguration  from :/home/kenji/ghq/github.com/tier4/rosbridge_suite/build/rosbridge_library/CTestConfiguration.ini
Parse Config file:/home/kenji/ghq/github.com/tier4/rosbridge_suite/build/rosbridge_library/CTestConfiguration.ini
   Site: desktop
   Build name: (empty)
 Add coverage exclude regular expressions.
SetCTestConfiguration:CMakeCommand:/usr/bin/cmake
Create new tag: 20210924-1456 - Experimental
UpdateCTestConfiguration  from :/home/kenji/ghq/github.com/tier4/rosbridge_suite/build/rosbridge_library/CTestConfiguration.ini
Parse Config file:/home/kenji/ghq/github.com/tier4/rosbridge_suite/build/rosbridge_library/CTestConfiguration.ini
Test project /home/kenji/ghq/github.com/tier4/rosbridge_suite/build/rosbridge_library
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 1
    Start 1: test_ros_loader

1: Test command: /usr/bin/python3 "-u" "/opt/ros/galactic/share/ament_cmake_test/cmake/run_test.py" "/home/kenji/ghq/github.com/tier4/rosbridge_suite/build/rosbridge_library/test_results/rosbridge_library/test_ros_loader.xunit.xml" "--package-name" "rosbridge_library" "--output-file" "/home/kenji/ghq/github.com/tier4/rosbridge_suite/build/rosbridge_library/ament_cmake_pytest/test_ros_loader.txt" "--command" "/usr/bin/python3" "-u" "-m" "pytest" "/home/kenji/ghq/github.com/tier4/rosbridge_suite/rosbridge_library/test/internal/test_ros_loader.py" "-o" "cache_dir=/home/kenji/ghq/github.com/tier4/rosbridge_suite/build/rosbridge_library/ament_cmake_pytest/test_ros_loader/.cache" "--junit-xml=/home/kenji/ghq/github.com/tier4/rosbridge_suite/build/rosbridge_library/test_results/rosbridge_library/test_ros_loader.xunit.xml" "--junit-prefix=rosbridge_library"
1: Test timeout computed to be: 60
1: -- run_test.py: invoking following command in '/home/kenji/ghq/github.com/tier4/rosbridge_suite/build/rosbridge_library':
1:  - /usr/bin/python3 -u -m pytest /home/kenji/ghq/github.com/tier4/rosbridge_suite/rosbridge_library/test/internal/test_ros_loader.py -o cache_dir=/home/kenji/ghq/github.com/tier4/rosbridge_suite/build/rosbridge_library/ament_cmake_pytest/test_ros_loader/.cache --junit-xml=/home/kenji/ghq/github.com/tier4/rosbridge_suite/build/rosbridge_library/test_results/rosbridge_library/test_ros_loader.xunit.xml --junit-prefix=rosbridge_library
1: ============================= test session starts ==============================
1: platform linux -- Python 3.8.10, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
1: cachedir: build/rosbridge_library/ament_cmake_pytest/test_ros_loader/.cache
1: rootdir: /home/kenji/ghq/github.com/tier4/rosbridge_suite
1: plugins: ament-lint-0.10.6, ament-pep257-0.10.6, launch-testing-0.17.0, ament-copyright-0.10.6, ament-xmllint-0.10.6, launch-testing-ros-0.14.2, ament-flake8-0.10.6, cov-2.12.1, asyncio-0.15.1, rerunfailures-10.1, repeat-0.9.1, dash-2.0.0, mock-1.10.4, colcon-core-0.6.1
1: collected 16 items
1: 
1: ../../rosbridge_library/test/internal/test_ros_loader.py ............... [ 93%]
1: .                                                                        [100%]
1: 
1: - generated xml file: /home/kenji/ghq/github.com/tier4/rosbridge_suite/build/rosbridge_library/test_results/rosbridge_library/test_ros_loader.xunit.xml -
1: ============================== 16 passed in 0.28s ==============================
1: -- run_test.py: return code 0
1: -- run_test.py: verify result file '/home/kenji/ghq/github.com/tier4/rosbridge_suite/build/rosbridge_library/test_results/rosbridge_library/test_ros_loader.xunit.xml'
1/1 Test #1: test_ros_loader ..................   Passed    1.10 sec

100% tests passed, 0 tests failed out of 1

Label Time Summary:
pytest    =   1.10 sec*proc (1 test)

Total Test time (real) =   1.10 sec
---
Finished <<< rosbridge_library [1.16s]

Summary: 1 package finished [1.30s]

Related: #643

Copy link
Member

@amacneil amacneil left a comment

Choose a reason for hiding this comment

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

thanks! needs rebase before merging

@kenji-miyake
Copy link
Contributor Author

@amacneil Thank you for your review! Resolved conflicts instead of rebasing.

@jtbandes
Copy link
Member

Suggesting some changes in tier4#11

@kenji-miyake
Copy link
Contributor Author

@jtbandes Thank you, I merged your change.

@jtbandes
Copy link
Member

I guess I forgot to fix lint errors after my change, sorry :)

@kenji-miyake
Copy link
Contributor Author

Rebased to import the latest changes.

@jtbandes
Copy link
Member

jtbandes commented Dec 9, 2021

Can you please rebase on #686 ? These newly added tests were not running in CI, and they might need more changes to be able to pass CI.

Kenji Miyake added 2 commits December 10, 2021 12:28
Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
@kenji-miyake
Copy link
Contributor Author

@jtbandes Rebased and the test passed except for rolling.
https://github.com/RobotWebTools/rosbridge_suite/runs/4479225984?check_suite_focus=true
image

@jtbandes
Copy link
Member

Thanks, it passed after I re-ran the job. I guess the test is just a little bit flaky.

@jtbandes jtbandes merged commit 958d413 into RobotWebTools:ros2 Dec 10, 2021
@kenji-miyake kenji-miyake deleted the fix-rostest-ros-loader branch December 10, 2021 04:39
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