docs: Add section about sorting into multiple queues #112
GitHub Actions / Junit reports
failed
Dec 26, 2023 in 0s
65 tests run, 64 passed, 0 skipped, 1 failed.
Annotations
Check failure on line 487 in .mypy_cache/3.8/tests/test_client.data.json
github-actions / Junit reports
test_client.test_client_use_connect_disconnect_multiple_message
AssertionError: assert b'5' == b'task_a'
At index 0 diff: b'5' != b't'
Full diff:
- b'task_a'
+ b'5'
Raw output
@pytest.mark.network
async def test_client_use_connect_disconnect_multiple_message() -> None:
custom_client = Client(HOSTNAME)
publish_client = Client(HOSTNAME)
await custom_client.connect()
await publish_client.connect()
async def task_a_customer(
task_status: TaskStatus[None] = TASK_STATUS_IGNORED,
) -> None:
await custom_client.subscribe("a/b/c")
async with custom_client.messages() as messages:
task_status.started()
async for message in messages:
assert message.payload == b"task_a"
return
async def task_b_customer(
task_status: TaskStatus[None] = TASK_STATUS_IGNORED,
) -> None:
num = 0
await custom_client.subscribe("qwer")
async with custom_client.messages() as messages:
task_status.started()
async for message in messages:
assert message.payload in [b"task_a", b"task_b"]
num += 1
if num == 2: # noqa: PLR2004
return
async def task_publisher(topic: str, payload: PayloadType) -> None:
await publish_client.publish(topic, payload)
> async with anyio.create_task_group() as tg:
tests/test_client.py:506:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:597: in __aexit__
raise exceptions[0]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
task_status = <anyio._backends._asyncio._AsyncioTaskStatus object at 0x7facafc2f6a0>
async def task_a_customer(
task_status: TaskStatus[None] = TASK_STATUS_IGNORED,
) -> None:
await custom_client.subscribe("a/b/c")
async with custom_client.messages() as messages:
task_status.started()
async for message in messages:
> assert message.payload == b"task_a"
E AssertionError: assert b'5' == b'task_a'
E At index 0 diff: b'5' != b't'
E Full diff:
E - b'task_a'
E + b'5'
tests/test_client.py:487: AssertionError
Loading