HomeSoftware Heritage

pytest_plugin: Prevent possible hang in consumer fixture destruction

Description

pytest_plugin: Prevent possible hang in consumer fixture destruction

Since the release of confluent-kafka v1.6.0, some swh-storage tests became
flaky and can hang in consumer fixture destruction when closing the wrapped
kafka consumer.

Explicitly performing the commit operation on the consumer before closing
it removes the hang issue.

Details