mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-11 07:47:12 +02:00
removes timeout_start_sec
I misinterpreted this option as the time to wait before starting the task. This is apparently not what it stands for in systemd.service
This commit is contained in:
@ -383,25 +383,6 @@ async def test_non_exceeding_start_limit_interval_sec_and_burst(
|
||||
assert service_instance.my_task.status == TaskStatus.RUNNING
|
||||
|
||||
|
||||
@pytest.mark.asyncio(scope="function")
|
||||
async def test_timeout_start_sec(caplog: LogCaptureFixture) -> None:
|
||||
class MyService(pydase.DataService):
|
||||
@task(timeout_start_sec=0.2)
|
||||
async def my_task(self) -> None:
|
||||
logger.info("Starting task.")
|
||||
await asyncio.sleep(1)
|
||||
|
||||
service_instance = MyService()
|
||||
state_manager = StateManager(service_instance)
|
||||
DataServiceObserver(state_manager)
|
||||
service_instance.my_task.start()
|
||||
|
||||
await asyncio.sleep(0.1)
|
||||
assert "Starting task." not in caplog.text
|
||||
await asyncio.sleep(0.2)
|
||||
assert "Starting task." in caplog.text
|
||||
|
||||
|
||||
@pytest.mark.asyncio(scope="function")
|
||||
async def test_exit_on_failure(
|
||||
monkeypatch: pytest.MonkeyPatch, caplog: LogCaptureFixture
|
||||
|
Reference in New Issue
Block a user