Skip to content

Commit a4c7add

Browse files
tests: adding timeout to each test (#3621)
* tests: adding timeout to each test * chore: adding changelog file 3621.added.md [dependabot-skip] --------- Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent 1d80426 commit a4c7add

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ env:
3333
DPF_PORT: 21004
3434
MAPDL_PACKAGE: ghcr.io/ansys/mapdl
3535
ON_CI: True
36-
PYTEST_ARGUMENTS: '-vvv -rxXsa --color=yes --durations=10 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html'
36+
PYTEST_ARGUMENTS: '-vvv -rxXsa --color=yes --durations=10 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html --timeout=40'
3737

3838
BUILD_CHEATSHEET: True
3939

@@ -821,7 +821,7 @@ jobs:
821821
822822
- name: "Unit testing requirements installation"
823823
run: |
824-
python -m pip install pytest pytest-rerunfailures pytest-cov pytest-random-order pyfakefs
824+
python -m pip install pytest pytest-rerunfailures pytest-cov pytest-random-order pyfakefs pytest-timeout
825825
826826
- name: "Unit testing"
827827
env:
@@ -929,7 +929,7 @@ jobs:
929929
930930
- name: "Unit testing requirements installation"
931931
run: |
932-
python -m pip install pytest pytest-rerunfailures pytest-cov pytest-random-order
932+
python -m pip install pytest pytest-rerunfailures pytest-cov pytest-random-order pyfakefs pytest-timeout
933933
934934
- name: "Unit testing"
935935
env:

doc/changelog.d/3621.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tests: adding timeout to each test

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ tests = [
6666
"pytest-pyvista==0.1.9",
6767
"pytest-random-order==1.1.1",
6868
"pytest-rerunfailures==15.0",
69+
"pytest-timeout==2.3.1",
6970
"pytest==8.3.4",
7071
"scipy==1.14.1",
7172
"vtk==9.3.1",
@@ -117,7 +118,7 @@ pymapdl_convert_script = "ansys.mapdl.core.cli:old_pymapdl_convert_script_entry_
117118
pymapdl = "ansys.mapdl.core.cli:main"
118119

119120
[tool.pytest.ini_options]
120-
addopts = "-rxXsa -vvv --maxfail=10 --random-order-bucket=class --random-order --durations=10"
121+
addopts = "-rxXsa -vvv --maxfail=10 --random-order-bucket=class --random-order --durations=10 --timeout=40"
121122
junit_family = "legacy"
122123
filterwarnings = [
123124
"ignore::FutureWarning",

0 commit comments

Comments
 (0)