From faec11ea043b0c6770e04df1acc4837cfc091f2a Mon Sep 17 00:00:00 2001 From: German Date: Tue, 7 Nov 2023 13:00:24 +0100 Subject: [PATCH 1/2] Adding duration limit globally --- .github/workflows/ci.yml | 1 + pyproject.toml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0986a3c11d..c427f667bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -477,6 +477,7 @@ jobs: env: ON_LOCAL: true ON_UBUNTU: true + PYTEST_TIMEOUT: 120 # seconds. Limit the duration for each unit test steps: - name: "Install Git and checkout project" diff --git a/pyproject.toml b/pyproject.toml index a7e2f1fb0f..8386027703 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,6 +76,7 @@ tests = [ "vtk==9.2.6", "pytest-rerunfailures==12.0", "pytest-pyvista==0.1.9", + "pytest-timeout==2.2.0", ] doc = [ "sphinx==7.2.6", From 35491e15940d1c4390ae27e634b604dc47d0a358 Mon Sep 17 00:00:00 2001 From: German Date: Tue, 7 Nov 2023 16:14:16 +0100 Subject: [PATCH 2/2] Increasing timeout --- .ci/run_vms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/run_vms.py b/.ci/run_vms.py index 087513ff83..8b1e7f8262 100644 --- a/.ci/run_vms.py +++ b/.ci/run_vms.py @@ -2,7 +2,7 @@ from ansys.mapdl.core import launch_mapdl from ansys.mapdl.core.examples import vmfiles -mapdl = launch_mapdl() +mapdl = launch_mapdl(start_timeout=100) vms = list(vmfiles.keys()) @@ -11,4 +11,5 @@ print(f"Running the vm {i}: {vm}") output = mapdl.input(vmfiles[vm]) print(f"Running the vm {i}: Successfully completed") + mapdl.exit()