Skip to content

Commit

Permalink
[App] update app testing (#16000)
Browse files Browse the repository at this point in the history
Co-authored-by: thomas <thomas@thomass-MacBook-Pro.local>
  • Loading branch information
2 people authored and carmocca committed Dec 20, 2022
1 parent 2807ead commit 114c931
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lightning_app/testing/config.py
Expand Up @@ -6,7 +6,7 @@
class _Config:
id = os.getenv("LIGHTNING_USER_ID")
key = os.getenv("LIGHTNING_API_KEY")
url = os.getenv("LIGHTNING_CLOUD_URL", "")
url = os.getenv("LIGHTNING_CLOUD_URL", "https://lightning.ai")
api_key = os.getenv("LIGHTNING_API_KEY")
username = os.getenv("LIGHTNING_USERNAME")
video_location = os.getenv("VIDEO_LOCATION", "./artifacts/videos")
Expand Down
4 changes: 2 additions & 2 deletions src/lightning_app/testing/testing.py
Expand Up @@ -488,12 +488,12 @@ def wait_for(page, callback: Callable, *args, **kwargs) -> Any:
except (playwright._impl._api_types.Error, playwright._impl._api_types.TimeoutError) as e:
print(e)
try:
sleep(5)
sleep(7)
page.reload()
except (playwright._impl._api_types.Error, playwright._impl._api_types.TimeoutError) as e:
print(e)
pass
sleep(2)
sleep(3)


def _delete_lightning_app(client, project_id, app_id, app_name):
Expand Down
4 changes: 2 additions & 2 deletions tests/tests_examples_app/public/test_boring_app.py
Expand Up @@ -10,7 +10,7 @@

@pytest.mark.cloud
def test_boring_app_example_cloud() -> None:
with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "app_boring"), app_name="app_dynamic.py", debug=True,) as (
with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "app_boring"), app_name="app_dynamic.py", debug=True) as (
_,
view_page,
_,
Expand All @@ -30,5 +30,5 @@ def check_hello_there(*_, **__):

assert result.exit_code == 0
assert result.exception is None
assert any("--filepath=/content/.storage/boring_file.txt" in line for line in lines)
assert any("Received from root.dict.dst_w" in line for line in lines)
print("Succeeded App!")

0 comments on commit 114c931

Please sign in to comment.