Skip to content

Commit 818d1dd

Browse files
committed
improve fixture
1 parent 25f9f93 commit 818d1dd

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

packages/pytest-simcore/src/pytest_simcore/rabbit_service.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import asyncio
77
import logging
88
from collections.abc import AsyncIterator, Awaitable, Callable
9-
from contextlib import suppress
109

1110
import aio_pika
1211
import pytest
@@ -141,12 +140,11 @@ async def ensure_parametrized_queue_is_empty(
141140
rabbitmq_client = create_rabbitmq_client("pytest-purger")
142141

143142
async def _queue_messages_purger() -> None:
144-
with suppress(aio_pika.exceptions.ChannelClosed):
145-
assert rabbitmq_client._channel_pool # noqa: SLF001
146-
async with rabbitmq_client._channel_pool.acquire() as channel: # noqa: SLF001
147-
assert isinstance(channel, aio_pika.RobustChannel)
148-
queue = await channel.get_queue(queue_name)
149-
await queue.purge()
143+
assert rabbitmq_client._channel_pool # noqa: SLF001
144+
async with rabbitmq_client._channel_pool.acquire() as channel: # noqa: SLF001
145+
assert isinstance(channel, aio_pika.RobustChannel)
146+
queue = await channel.get_queue(queue_name)
147+
await queue.purge()
150148

151149
await _queue_messages_purger()
152150
yield

0 commit comments

Comments
 (0)