Skip to content

Commit 8203f47

Browse files
committed
Update template-pipeline-stages.yml
1 parent faaa5fe commit 8203f47

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.Pipelines/template-pipeline-stages.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,15 @@ stages:
156156
set -euo pipefail
157157
python -m pip install --upgrade pip
158158
pip install -r requirements.txt
159-
pip install pytest pytest-azurepipelines
159+
pip install pytest pytest-azurepipelines pytest-timeout
160160
displayName: 'Install Python dependencies'
161161
162162
- bash: |
163163
set -o pipefail
164164
mkdir -p test-results
165165
pytest -vv \
166166
--benchmark-skip \
167+
--timeout=120 \
167168
--junitxml=test-results/junit-unit.xml \
168169
--ignore=tests/test_e2e.py \
169170
--ignore=tests/test_e2e_manual.py \
@@ -172,15 +173,21 @@ stages:
172173
--deselect tests/test_cryptography.py::CryptographyTestCase::test_should_be_run_with_latest_version_of_cryptography \
173174
2>&1 | tee test-results/pytest-unit.log
174175
displayName: 'Run pytest (unit)'
176+
env:
177+
# Force unbuffered stdout so ADO logs stream in real time through the tee pipe.
178+
PYTHONUNBUFFERED: '1'
175179
176180
# Run cryptography version-gating tests separately as a warning-only check.
177181
- bash: |
178182
pytest -vv \
183+
--timeout=60 \
179184
tests/test_cryptography.py::CryptographyTestCase::test_ceiling_should_be_latest_cryptography_version_plus_three \
180185
tests/test_cryptography.py::CryptographyTestCase::test_should_be_run_with_latest_version_of_cryptography \
181186
--junitxml=test-results/junit-crypto-ceiling.xml
182187
displayName: 'Check cryptography ceiling (warning only)'
183188
continueOnError: true
189+
env:
190+
PYTHONUNBUFFERED: '1'
184191
185192
- task: PublishTestResults@2
186193
displayName: 'Publish unit test results'
@@ -261,18 +268,21 @@ stages:
261268
set -euo pipefail
262269
python -m pip install --upgrade pip
263270
pip install -r requirements.txt
264-
pip install pytest pytest-azurepipelines
271+
pip install pytest pytest-azurepipelines pytest-timeout
265272
displayName: 'Install Python dependencies'
266273
267274
- bash: |
268275
set -o pipefail
269276
mkdir -p test-results
270277
pytest -vv \
278+
--timeout=300 \
271279
--junitxml=test-results/junit-e2e.xml \
272280
tests/test_e2e.py tests/test_fmi_e2e.py \
273281
2>&1 | tee test-results/pytest-e2e.log
274282
displayName: 'Run pytest (E2E)'
275283
env:
284+
# Force unbuffered stdout so ADO logs stream in real time through the tee pipe.
285+
PYTHONUNBUFFERED: '1'
276286
LAB_APP_CLIENT_CERT_PFX_PATH: $(LAB_APP_CLIENT_CERT_PFX_PATH)
277287
278288
- task: PublishTestResults@2

0 commit comments

Comments
 (0)