Skip to content

Commit 3a9204c

Browse files
authored
Set timeout for tests job on CI (#27)
- Remove timeouts from tests - Remove pytest-timeout
1 parent a74b868 commit 3a9204c

File tree

5 files changed

+3
-10
lines changed

5 files changed

+3
-10
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
run: make bootstrap
6363

6464
- name: Run tests on Python ${{ matrix.python }}
65+
timeout-minutes: 10
6566
run: make testcluster
6667

6768
- name: Run genproto

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ test: bootstrap
4444
$(PYTHON) -m pytest
4545

4646
testcluster: bootstrap
47-
$(PYTHON) -m pifpaf -e TEST --debug run etcd --cluster -- $(PYTHON) -m pytest --timeout=60 --cov-report=xml
47+
$(PYTHON) -m pifpaf -e TEST --debug run etcd --cluster -- $(PYTHON) -m pytest --with-cluster --cov-report=xml
4848

4949
testreport: bootstrap
5050
$(PYTHON) -m pytest --cov-report=html

setup.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ application-import-names = aetcd
99
[tool:pytest]
1010
addopts =
1111
--cov=aetcd
12-
--timeout=30
1312
tests
1413
asyncio_mode = auto
1514

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ def _get_long_description():
7070
'pytest-asyncio==0.20.3',
7171
'pytest-cov==4.0.0',
7272
'pytest-mock==3.10.0',
73-
'pytest-timeout==2.1.0',
7473
'pytest==7.2.1',
7574
],
7675
},

tests/integration/conftest.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,7 @@ async def _etcdctl(*args, ignore_result=False):
3030
stderr=asyncio.subprocess.PIPE,
3131
)
3232

33-
try:
34-
stdout, stderr = await asyncio.wait_for(
35-
proc.communicate(),
36-
timeout=15,
37-
)
38-
except asyncio.TimeoutError:
39-
raise Exception(f'Timeout during awaiting process with args {args!r}')
33+
stdout, stderr = await proc.communicate()
4034

4135
if proc.returncode != 0:
4236
raise Exception(f'Error during awaiting process with args {args!r}: {stderr}')

0 commit comments

Comments
 (0)