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

Make hardcoded 15 second launch_testing timeout configurable #582

Closed
Aposhian opened this issue Jan 13, 2022 · 3 comments
Closed

Make hardcoded 15 second launch_testing timeout configurable #582

Aposhian opened this issue Jan 13, 2022 · 3 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@Aposhian
Copy link

Feature request

Feature description

Currently you only get 15 seconds to signal ReadyToTest. This is not configurable, which means that you can't use processes that take a long time to startup.

Implementation considerations

Ideally this could be configured at the launch file level. Maybe the tests themselves could say how long they are willing to wait for ReadyToTest?

@clalancette
Copy link
Contributor

Yeah, agreed that this would be nice to make configurable. Please consider making a pull request to do so, we're happy to review.

@clalancette clalancette added the help wanted Extra attention is needed label Feb 3, 2022
@jacobperron
Copy link
Member

I also hit this hard-coded limit recently. It's easy to reproduce with the following launch test file:

import launch
from launch.actions import TimerAction
import launch_testing.markers
from launch_testing.actions import ReadyToTest


def generate_test_description():
    return launch.LaunchDescription([
        TimerAction(period=16.0, actions=[ReadyToTest()]),
    ])

As a potential workaround, the alternative launch_pytest package does not have such a limit. Here is the equivalent test file written with launch_pytest:

import pytest

import launch
from launch.actions import TimerAction
import launch_pytest
from launch_pytest.actions import ReadyToTest


@launch_pytest.fixture
def launch_description():
    return launch.LaunchDescription([
        TimerAction(period=16.0, actions=[ReadyToTest()]),
    ])


@pytest.mark.launch(fixture=launch_description)
def test_case_1():
    pass

@deepanshubansal01
Copy link
Contributor

Closing the issue, since the feature has been implemented #625

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants