Changeset View
Changeset View
Standalone View
Standalone View
swh/journal/pytest_plugin.py
Show First 20 Lines • Show All 199 Lines • ▼ Show 20 Lines | def kafka_server_base() -> Iterator[str]: | ||||
assert len(brokers) == 1, "More than one broker found in the kafka cluster?!" | assert len(brokers) == 1, "More than one broker found in the kafka cluster?!" | ||||
broker_connstr, broker_id = brokers[0].split("/") | broker_connstr, broker_id = brokers[0].split("/") | ||||
yield broker_connstr | yield broker_connstr | ||||
TEST_CONFIG = { | TEST_CONFIG = { | ||||
"consumer_id": "swh.journal.consumer", | "consumer_id": "swh.journal.consumer", | ||||
"stop_after_objects": 1, # will read 1 object and stop | "stop_on_eof": True, | ||||
"storage": {"cls": "memory", "args": {}}, | "storage": {"cls": "memory", "args": {}}, | ||||
} | } | ||||
@pytest.fixture | @pytest.fixture | ||||
def test_config( | def test_config( | ||||
kafka_server_base: str, | kafka_server_base: str, | ||||
kafka_prefix: str, | kafka_prefix: str, | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |