potiuk opened a new pull request, #65842: URL: https://github.com/apache/airflow/pull/65842
After #65826, the duplicate-hostname check in `celery_command.worker()` runs on a fresh `Celery()` app rather than on the executor's module-level app. The PR updated the two `TestWorkerDuplicateHostnameCheck` tests to patch `airflow.providers.celery.cli.celery_command.Celery`, but missed `TestWorkerStart::test_worker_started_with_required_arguments`, which also passes `--celery-hostname` and therefore now hits the same code path. Without the patch, the test instantiates a real Celery client and `temp_app.control.inspect().active_queues()` tries to open a broker connection, failing in CI with: ``` kombu.exceptions.OperationalError: [Errno 111] Connection refused ``` Mock `Celery` (and `kombu.pools.reset` for symmetry with the sibling tests) so the test no longer touches a real broker. Example failure: https://github.com/apache/airflow/actions/runs/24934454291/job/73018112670 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 4.7) Generated-by: Claude Code (Opus 4.7) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
