Skip to content

Commit

Permalink
[fix] Test for closed channel
Browse files Browse the repository at this point in the history
  • Loading branch information
mosquito committed Feb 17, 2020
1 parent 56bf42c commit d5a4bac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_amqp.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

import pytest
import shortuuid

import aiormq.exceptions
from aiormq import ChannelLockedResource

import aio_pika
Expand Down Expand Up @@ -1104,6 +1106,9 @@ async def test_unexpected_channel_close(self):
await channel.declare_queue("amq.restricted_queue_name",
auto_delete=True)

with pytest.raises(aiormq.exceptions.ChannelInvalidStateError):
await channel.set_qos(100)

await asyncio.wait((client.close(), client.closing))

async def test_declaration_result(self):
Expand Down

0 comments on commit d5a4bac

Please sign in to comment.