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

Resolve workarounds in rosbag2_tests for Windows #271

Closed
zmichaels11 opened this issue Jan 28, 2020 · 4 comments
Closed

Resolve workarounds in rosbag2_tests for Windows #271

zmichaels11 opened this issue Jan 28, 2020 · 4 comments
Assignees
Labels
bug Something isn't working Windows Windows support

Comments

@zmichaels11
Copy link
Contributor

test_rosbag2_record_end_to_end defines a workaround for Windows in multiple places due to Windows not supporting a mechanism to programmatically send a SIGINT.

These tests should either be rewritten to not require the workaround or a helper function should be written so less platform-specific code is required.

@piraka9011
Copy link
Contributor

piraka9011 commented Feb 7, 2020

I have created a Pytest that can successfully execute a ros2bag CLI command and send a CTRL_C_EVENT to gracefully terminate it. The issue is that when I run it with colcon test the CTRL_C_EVENT aborts the colcon test command as well.

I opened an issue (colcon/colcon-core#303) to discuss why this is the case and propose a path forward.

An potential approach in the future would be to use stdin pipes to communicate with the ros2bag command via keyboard events if that feature is developed.

@zmichaels11
Copy link
Contributor Author

zmichaels11 commented Feb 14, 2020

As per our discussion yesterday, it might make sense to rewrite the e2e tests in Python and use launch_testing. (Also brought up in ros-tooling meeting)
Similar problem happened in Gazebo project.

@Karsten1987
Copy link
Collaborator

I think one helpful addition would be to introduce a close function to the final Reader and Writer class. The closing function is generally provoked via the destructor, which works well as long as you don't try to ctrl-c on Windows. Having a public function for this would allow us to manually trigger this within the tests before ctrl-c.

@chapulina chapulina added the Windows Windows support label Apr 19, 2021
@MichaelOrlov
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Windows Windows support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants