diff --git a/RELEASE.md b/RELEASE.md index 2b2cc4118e..5323ed5670 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -5,6 +5,12 @@ Please follow the established format: - Use present tense (e.g. 'Add new feature') - Include the ID number for the related PR (or PRs) in parentheses --> +# Upcoming Release + +## Bug fixes and other changes + +- Increase Kedro-Viz timeout. (#1803) + # Release 8.0.1 ## Bug fixes and other changes diff --git a/package/kedro_viz/launchers/utils.py b/package/kedro_viz/launchers/utils.py index 1342dc4bd8..1ade2b426c 100644 --- a/package/kedro_viz/launchers/utils.py +++ b/package/kedro_viz/launchers/utils.py @@ -18,7 +18,8 @@ class WaitForException(Exception): def _wait_for( func: Callable, expected_result: Any = True, - timeout: int = 60, + # [TODO] This is a temporary fix for https://github.com/kedro-org/kedro-viz/issues/1768. + timeout: int = 600, print_error: bool = True, sleep_for: int = 1, **kwargs, diff --git a/package/tests/test_launchers/test_cli.py b/package/tests/test_launchers/test_cli.py index 2d6282780d..6a9bad9cb6 100755 --- a/package/tests/test_launchers/test_cli.py +++ b/package/tests/test_launchers/test_cli.py @@ -178,7 +178,7 @@ def test_kedro_viz_command_run_server( ): process_init = mocker.patch("multiprocessing.Process") runner = CliRunner() - + # Reduce the timeout argument from 600 to 1 to make test run faster. mocker.patch("kedro_viz.launchers.cli._wait_for.__defaults__", (True, 1, True, 1)) with runner.isolated_filesystem(): @@ -200,7 +200,11 @@ def test_kedro_viz_command_should_log_outdated_version( data={"info": {"version": mock_version}} ) + # test push mocker.patch("kedro_viz.server.run_server") + + # Reduce the timeout argument from 600 to 1 to make test run faster. + mocker.patch("kedro_viz.launchers.cli._wait_for.__defaults__", (True, 1, True, 1)) runner = CliRunner() with runner.isolated_filesystem(): runner.invoke(cli.viz_cli, ["viz", "run"]) @@ -228,6 +232,8 @@ def test_kedro_viz_command_should_not_log_latest_version( ) mocker.patch("kedro_viz.server.run_server") + # Reduce the timeout argument from 600 to 1 to make test run faster. + mocker.patch("kedro_viz.launchers.cli._wait_for.__defaults__", (True, 1, True, 1)) runner = CliRunner() with runner.isolated_filesystem(): runner.invoke(cli.viz_cli, ["viz", "run"]) @@ -244,6 +250,8 @@ def test_kedro_viz_command_should_not_log_if_pypi_is_down( requests_get.side_effect = requests.exceptions.RequestException("PyPI is down") mocker.patch("kedro_viz.server.run_server") + # Reduce the timeout argument from 600 to 1 to make test run faster. + mocker.patch("kedro_viz.launchers.cli._wait_for.__defaults__", (True, 1, True, 1)) runner = CliRunner() with runner.isolated_filesystem(): runner.invoke(cli.viz_cli, ["viz", "run"]) @@ -258,7 +266,7 @@ def test_kedro_viz_command_with_autoreload( ): process_init = mocker.patch("multiprocessing.Process") - # Reduce the timeout argument from 60 to 1 to make test run faster. + # Reduce the timeout argument from 600 to 1 to make test run faster. mocker.patch("kedro_viz.launchers.cli._wait_for.__defaults__", (True, 1, True, 1)) runner = CliRunner() with runner.isolated_filesystem():