lightning/tests/tests_examples_app/local/test_idle_timeout.py

24 lines
557 B
Python
Raw Normal View History

import os
from time import sleep
import pytest
from tests_examples_app.local import _PATH_APPS
from lightning_app.testing.testing import run_app_in_cloud
@pytest.mark.cloud
def test_idle_timeout_example_cloud() -> None:
with run_app_in_cloud(os.path.join(_PATH_APPS, "idle_timeout")) as (
_,
_,
fetch_logs,
2022-08-10 09:48:06 +00:00
_,
):
has_logs = False
while not has_logs:
2022-08-10 11:17:29 +00:00
for log in fetch_logs(["flow"]):
if "Application End" in log:
has_logs = True
sleep(1)