Skip to content

Migrate launch tests to new launch_testing features & API#140

Merged
hidmic merged 3 commits intomasterfrom
hidmic/import_launch_testing
Apr 30, 2019
Merged

Migrate launch tests to new launch_testing features & API#140
hidmic merged 3 commits intomasterfrom
hidmic/import_launch_testing

Conversation

@hidmic
Copy link
Copy Markdown

@hidmic hidmic commented Mar 25, 2019

Connected to ros2/launch#208.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
@hidmic hidmic added the in progress Actively being worked on (Kanban column) label Mar 25, 2019
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}

Copy link
Copy Markdown
Contributor

@pbaughman pbaughman Apr 9, 2019

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>
@hidmic hidmic added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Apr 12, 2019
Copy link
Copy Markdown
Member

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

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

LGTM pending CI

Copy link
Copy Markdown
Member

@ivanpauno ivanpauno left a 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
Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Author

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

@hidmic hidmic merged commit e52f2cf into master Apr 30, 2019
@delete-merged-branch delete-merged-branch bot deleted the hidmic/import_launch_testing branch April 30, 2019 22:48
@hidmic hidmic removed the in review Waiting for review (Kanban column) label Apr 30, 2019
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.

4 participants