-
Notifications
You must be signed in to change notification settings - Fork 138
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
Add timeout for ReadyToTest action #622
Add timeout for ReadyToTest action #622
Conversation
Signed-off-by: deepanshu <[email protected]>
Signed-off-by: deepanshu <[email protected]>
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.
Can we have a test that uses multiple runners or Launch descriptions ? Probably like a parameterized test here ?
@launch_testing.parametrize('my_param', [1, 2, 3]) |
launch_testing/test/launch_testing/test_launch_test_runner_validation.py
Outdated
Show resolved
Hide resolved
I can try that but is this test for checking if we can we have multiple runners/launch descriptions or for testing the timeout thing? |
Yup I meant if launch allows multiple runners at all, we should have a timeout test in that situation. |
Signed-off-by: deepanshu <[email protected]>
Based on our discussion offline we don't need this now. |
launch_testing/test/launch_testing/test_launch_test_runner_validation.py
Outdated
Show resolved
Hide resolved
Signed-off-by: deepanshu <[email protected]>
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.
The new option looks good to me 👍
launch_testing/test/launch_testing/test_launch_test_runner_validation.py
Outdated
Show resolved
Hide resolved
launch_testing/test/launch_testing/test_launch_test_runner_validation.py
Outdated
Show resolved
Hide resolved
Signed-off-by: deepanshu <[email protected]>
Signed-off-by: deepanshu <[email protected]>
Signed-off-by: deepanshu <[email protected]>
Signed-off-by: deepanshu <[email protected]>
@ros-pull-request-builder retest this please |
Signed-off-by: deepanshu <[email protected]>
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.
IMO, it would be nice if the timeout is somehow specified in the launch file, instead of being an option for the as a command line argument.
Is there any alternative to make that happen?
@@ -92,7 +98,8 @@ def run(parser, args, test_runner_cls=LaunchTestRunner): | |||
runner = test_runner_cls( | |||
test_runs=test_runs, | |||
launch_file_arguments=args.launch_arguments, | |||
debug=args.verbose | |||
debug=args.verbose, | |||
timeout=args.timeout |
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.
nit (in this way, the diff will not show one deleted line next time):
timeout=args.timeout | |
timeout=args.timeout, |
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.
Thanks!
How would the timeout parameter being added here being specified in practice? |
I tried making timeout configurable as part of launch file itself and having timeout as an argument to the The launch/launch_testing/launch_testing/test_runner.py Lines 60 to 64 in 074cd29
And the ReadyToTest object is instantiated here: launch/launch_testing/launch_testing/test_runner.py Lines 73 to 75 in 074cd29
|
I am not sure about this but right now the timeout can be passed through cli and manually to the |
Ok, I will take a look tomorrow and comment if I have any ideas. |
I couldn't think of way to configure the timeout in the launch file (though I agree it would be nicer). |
Ideally, I think that a decorator would be a nice way to specify it: @launch_testing.runner_processes_wait_timeout(5.3)
def generate_test_description(arg_param): To have something like that, the decorator would have to add a hidden attribute to the decorated function (e.g. @deepanshubansal01 @jacobperron does that make sense to you? |
@hidmic maybe you can provide more feedback of how to implement this |
@ivanpauno should I proceed with the implementation that you suggested or wait for @hidmic inputs. |
I think it's fine to proceed with the implementation. |
Closing the PR now, the feature will be implemented in this PR now #625 |
Related to #582
Signed-off-by: deepanshu [email protected]