Skip to content

Commit

Permalink
test: Fix warning about broker_connection_retry
Browse files Browse the repository at this point in the history
tests/frameworks/test_celery.py::test_error_reporting
  /usr/local/lib/python3.9/site-packages/celery/worker/consumer/consumer.py:507: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
  whether broker connection retries are made during startup in Celery 6.0 and above.
  If you wish to retain the existing behavior for retrying connections on startup,
  you should set broker_connection_retry_on_startup to True.
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

Signed-off-by: Ferenc Géczi <ferenc.geczi@ibm.com>
  • Loading branch information
Ferenc- committed Apr 16, 2024
1 parent 6f9d6f4 commit 507856f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
@pytest.fixture(scope='session')
def celery_config():
return {
'broker_connection_retry_on_startup': True,
'broker_url': 'redis://localhost:6379',
'result_backend': 'redis://localhost:6379'
}
Expand Down

0 comments on commit 507856f

Please sign in to comment.