File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
2
from typing import AsyncGenerator
3
+ from uuid import uuid4
3
4
4
5
import pytest
5
6
from aiokafka import AIOKafkaConsumer , AIOKafkaProducer
@@ -35,7 +36,7 @@ def base_topic_name() -> str:
35
36
36
37
:returns: topic name.
37
38
"""
38
- return "taskiq_topic"
39
+ return uuid4 (). hex
39
40
40
41
41
42
@pytest .fixture ()
@@ -134,8 +135,8 @@ async def broker(
134
135
bootstrap_servers = kafka_url ,
135
136
aiokafka_producer = test_kafka_producer ,
136
137
aiokafka_consumer = test_kafka_consumer ,
137
- delete_topic_on_shutdown = True ,
138
138
kafka_topic = base_topic ,
139
+ delete_topic_on_shutdown = True ,
139
140
)
140
141
broker .is_worker_process = True
141
142
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ async def test_startup(
73
73
str
74
74
] = broker_without_arguments ._kafka_admin_client .list_topics () # noqa: WPS437
75
75
76
- assert base_topic_name in all_kafka_topics
76
+ assert broker_without_arguments . _kafka_topic . name in all_kafka_topics
77
77
78
78
79
79
@pytest .mark .anyio
You can’t perform that action at this time.
0 commit comments