-
Notifications
You must be signed in to change notification settings - Fork 101
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
Migrate launch tests to new launch_testing features & API #140
Conversation
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
return_code = launch_test.run(launch_service) | ||
assert return_code == 0, 'Launch failed with exit code %r' % (return_code,) | ||
return launch_description, {'processes_to_test': processes_to_test} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect the lack of 'active' tests here will cause an issue, but it might be a problem that needs to be fixed in launch_testing. I'm suspicious that in the absence of tests, the test thread can send the 'shutdown' signal to the LaunchService before it's finished launching the processes, which may cause the test runner to hang waiting for the LaunchService to terminate. For robustness, it might be worth waiting for the process_to_test to terminate.
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with green CI
proc_output.assertWaitFor( | ||
expected_output=launch_testing.tools.expected_output_from_file( | ||
path=os.path.join(os.path.dirname(__file__), process_name) | ||
), process=process_name, timeout=10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, it's clearer process and timeout in a new line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could but it looks odd, right before the comma if you drop a line here
Connected to ros2/launch#208.