potiuk opened a new pull request, #74285:
URL: https://github.com/apache/airflow/pull/74285

   `test_get_consumer` and `test_get_producer` in the Kafka provider's hook 
tests patched `AdminClient`, which `KafkaConsumerHook` and `KafkaProducerHook` 
never use, so both tests built a real `confluent_kafka` client pointed at 
`localhost:9092`. The client is cached on the hook held by the test instance, 
so its native threads keep retrying the connection for the rest of the pytest 
session. In provider test runs this shows up as `rdkafka#consumer-1` / 
`rdkafka#producer-2` "Connect to … localhost:9092 failed" errors interleaved 
with unrelated tests, for example in 
https://github.com/apache/airflow/actions/runs/37321253685/job/111809018440. 
That run later died with a segfault; whether these threads caused it cannot be 
proven from the log, but they should not be running either way.
   
   The two tests now patch the `Consumer` / `Producer` class the hooks actually 
build, like the other tests in those files.
   
   Checked locally: before the change, running the hook tests prints 11 
`rdkafka#consumer-1` / `rdkafka#producer-2` connection errors; after it, none. 
All 186 Kafka provider unit tests pass, and `prek` passes on the changed files. 
No changelog entry: test-only change.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Claude Opus 5)
   
   Generated-by: Claude Code (Claude Opus 5) 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]

Reply via email to