Skip to content

Allow overriding broker settings in the kafka server fixture

To test the behavior of swh.journal under different settings of the kafka broker, split the kafka_server fixture into:

  • a persistent session_kafka_server fixture, spawning a single broker for the whole test session

  • a function-scoped kafka_server fixture, which uses the kafka admin client to override broker settings if needed, for the current test (and restores the original setting values afterwards)

The broker settings can be overridden for a given function using the parametrize decorator to change the return value of the kafka_server_config_overrides fixture.

Test Plan

tox is still happy


Migrated from D2979 (view on Phabricator)

Merge request reports