Skip to content

Commit bf60efb

Browse files
authored
Issue #170 - Enable the pytest-timeout plugin in CI (#407)
The plugin stops a python test after timeout expires. This does not create hard dependency on pytest to run tests in other environments outside of the CI. If we wanted to set individual timeouts per test, then this would impose such dependency.
1 parent 9145be6 commit bf60efb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/build.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
cmake "${{github.workspace}}/skupper-router" \
137137
"-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" \
138138
"-DCMAKE_BUILD_TYPE=${BuildType}" \
139-
"-DPYTHON_TEST_COMMAND='-m;pytest;-vs;--junit-prefix=pytest.\${py_test_module};--junit-xml=junitxmls/\${py_test_module}.xml;--pyargs;\${py_test_module}'" \
139+
"-DPYTHON_TEST_COMMAND='-m;pytest;-vs;--timeout=400;--junit-prefix=pytest.\${py_test_module};--junit-xml=junitxmls/\${py_test_module}.xml;--pyargs;\${py_test_module}'" \
140140
"-GNinja" \
141141
${RouterCMakeExtraArgs}
142142
@@ -431,7 +431,7 @@ jobs:
431431
cmake "${{github.workspace}}/skupper-router" \
432432
"-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" \
433433
"-DCMAKE_BUILD_TYPE=${BuildType}" \
434-
"-DPYTHON_TEST_COMMAND='-m;pytest;-vs;--junit-prefix=pytest.\${py_test_module};--junit-xml=junitxmls/\${py_test_module}.xml;--pyargs;\${py_test_module}'" \
434+
"-DPYTHON_TEST_COMMAND='-m;pytest;-vs;--timeout=400;--junit-prefix=pytest.\${py_test_module};--junit-xml=junitxmls/\${py_test_module}.xml;--pyargs;\${py_test_module}'" \
435435
${RouterCMakeExtraArgs} -DQD_ENABLE_ASSERTIONS=${RouterCMakeAsserts}
436436
437437
- name: skupper-router cmake build/install

requirements-dev.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ wheel
2727
tox
2828

2929
pytest
30+
pytest-instafail
31+
pytest-timeout
3032

3133
grpcio
3234
h2

0 commit comments

Comments
 (0)