Skip to content

Commit

Permalink
travis upgrade rabbitmq
Browse files Browse the repository at this point in the history
  • Loading branch information
mosquito committed Dec 6, 2018
1 parent 2f1f851 commit ee8b376
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
16 changes: 12 additions & 4 deletions .travis.yml
@@ -1,9 +1,14 @@
language: python

services:
- rabbitmq

language: python
addons:
apt:
sources:
- sourceline: deb https://packages.erlang-solutions.com/ubuntu trusty contrib
key_url: https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc
- sourceline: deb https://dl.bintray.com/rabbitmq/debian trusty main
key_url: https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
packages:
- esl-erlang=1:20.1

matrix:
include:
Expand All @@ -15,6 +20,9 @@ matrix:
env: TOXENV=py37
install:
- pip install tox coveralls codecov
before_script:
- sudo rm /opt/jdk_switcher/jdk_switcher.sh
- sudo apt-get install -y rabbitmq-server
script:
- tox
after_success:
Expand Down
11 changes: 6 additions & 5 deletions tests/test_amqp.py
Expand Up @@ -1390,18 +1390,19 @@ async def test_delivery_fail(self):
queue = await channel.declare_queue(exclusive=True, arguments={
'x-max-length': 1,
'x-overflow': 'reject-publish',
})
}, auto_delete=True)

await channel.default_exchange.publish(
aio_pika.Message(body=b'queue me'),
routing_key=queue.name
)

with pytest.raises(DeliveryError):
await channel.default_exchange.publish(
aio_pika.Message(body=b'reject me'),
routing_key=queue.name
)
for _ in range(10):
await channel.default_exchange.publish(
aio_pika.Message(body=b'reject me'),
routing_key=queue.name
)


class MessageTestCase(unittest.TestCase):
Expand Down

0 comments on commit ee8b376

Please sign in to comment.