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

Process isolation in tests #97

Open
asmodehn opened this issue Aug 31, 2016 · 2 comments
Open

Process isolation in tests #97

asmodehn opened this issue Aug 31, 2016 · 2 comments
Labels

Comments

@asmodehn
Copy link
Member

Currently the pyros tests are testing integration with sample ROS systems.

While it is very useful to ensure everything is working as expected (versus requiring specs/mock during unittest & have integration tests at a later stage), it triggers a conflict between :

  • ROS is inherently multiprocess.
  • Python Test Framework are by default "mono process", loading only one interpreter to run all tests.

Possible solutions are :

@asmodehn asmodehn added the bug label Aug 31, 2016
@asmodehn
Copy link
Member Author

After chatting with @stonier, another possible solution might be to use roslaunch or rosunit/rostest to launch a ROS node in its own subprocess. We need to investigate if this is doable in such cases.

@asmodehn
Copy link
Member Author

Also for testing in pyros we usually :

  • need to init_node to communicate via topics
  • need to run a custom test with ros_interface (which node_init by itself).

It is not yet clear if :

  • rostest/rosunit would support this usecase
  • we should always subprocess from inside the test code
  • we are better off using nosepipe to subprocess all tests by default.
  • we are better off moving to py.test and use xdist -n1 --boxed but careful.

For now, working around it by calling the tests separately and moving on...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant