Skip to content

Commit

Permalink
Run Azure CI on backport branch also (#4172)
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov authored Oct 9, 2019
1 parent 9c77d18 commit 0a9c4ba
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .azure-pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ trigger:
include:
- master
- ?.?* # matches to backport branches, e.g. 3.6
tags:
exclude:
- refs/tags/*
- '*'
pr:
autoCancel: true
branches:
include:
- master
- ?.?* # matches to backport branches, e.g. 3.6

variables:
- group: codecov
Expand Down
5 changes: 4 additions & 1 deletion .azure-pipelines/stage-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,12 @@ stages:
- script: |
pytest tests -vv
python -m coverage xml
displayName: 'pytest'
- script: |
python -m coverage xml
displayName: 'Prepare coverage'
- script: |
pip install codecov
python -m codecov -f coverage.xml -X gcov
Expand Down
6 changes: 3 additions & 3 deletions tests/test_client_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,17 +601,17 @@ async def test_read_timeout_between_chunks(aiohttp_client, mocker) -> None:
async def handler(request):
resp = aiohttp.web.StreamResponse()
await resp.prepare(request)
# write data 4 times, with pauses. Total time 0.4 seconds.
# write data 4 times, with pauses. Total time 2 seconds.
for _ in range(4):
await asyncio.sleep(0.1)
await asyncio.sleep(0.5)
await resp.write(b'data\n')
return resp

app = web.Application()
app.add_routes([web.get('/', handler)])

# A timeout of 0.2 seconds should apply per read.
timeout = aiohttp.ClientTimeout(sock_read=0.2)
timeout = aiohttp.ClientTimeout(sock_read=1)
client = await aiohttp_client(app, timeout=timeout)

res = b''
Expand Down
2 changes: 1 addition & 1 deletion tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class TestPyReify(ReifyMixin):
reify = helpers.reify_py


if not helpers.NO_EXTENSIONS and not IS_PYPY:
if not helpers.NO_EXTENSIONS and not IS_PYPY and hasattr(helpers, 'reify_c'):
class TestCReify(ReifyMixin):
reify = helpers.reify_c

Expand Down

0 comments on commit 0a9c4ba

Please sign in to comment.