Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Flaky unit test: TestReaderReconnector.test_reconnect_on_repeatable_error (timeout on 3.12)

Aperta
#850 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python

Direzione di ricerca

Inizia da ydb/_topic_reader/topic_reader_asyncio_test.py::TestReaderReconnector::test_reconnect_on_repeatable_error e dall’implementazione di wait_for_fast/wait_condition in ydb/_topic_common/test_helpers.py:46-67. Riproduci il timeout con Python 3.12, quindi segui ReaderReconnector attraverso il percorso dell’errore ripetibile e quello del flusso sano, inclusa l’avvertenza di teardown. Il lavoro è completato quando il test termina in modo affidabile sotto il carico di CI senza mascherare il comportamento aumentando soltanto il timeout.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

ydb/_topic_reader/topic_reader_asyncio_test.py::TestReaderReconnector::test_reconnect_on_repeatable_error fails intermittently in CI with a timeout. Recurring flake — has been seen on several unrelated PRs.

Failure

ydb._topic_common.test_helpers.WaitConditionError: Bad condition in test
ydb/_topic_common/test_helpers.py:67: WaitConditionError

The test drives ReaderReconnector through one repeatable error (Overloaded) and then a healthy stream, and waits via:

await wait_for_fast(reconnector.wait_message())   # topic_reader_asyncio_test.py:1561

wait_for_fast → wait_condition budgets 1s wall / 1000 loop iterations (test_helpers.py:46-67). When reconnector.wait_message() does not resolve within that budget the helper raises WaitConditionError. So this is a timing-sensitive timeout, not an assertion about reconnect behavior.

A teardown side-effect also shows up after the failure (likely secondary, from the aborted coroutine):

PytestUnraisableExceptionWarning: Exception ignored in: <coroutine object Queue.get ...>
RuntimeError: Event loop is closed

Environment / occurrence

Hypothesis / directions to investigate

  • The reconnect path (error stream → recreate → first message) occasionally needs more than the 1s / 1000-iteration budget under CI load, especially on 3.12's event-loop scheduling. Bumping the budget would only mask it.
  • Worth checking whether ReaderReconnector does extra await asyncio.sleep(0) hops on the reconnect path on 3.12, or whether a backoff/retry delay leaks into the loop and eats the budget.
  • Confirm the Event loop is closed teardown warning is purely secondary (GC of the parked wait_forever/Queue.get coroutine) and not contributing to the hang.

Workaround for now

Re-run the job; failure is intermittent and not a regression from the triggering PR.

Lingua principale
Python
Stelle
102
Fork
77
Merge medio
2g 17h
PR unite (30g)
11

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ydb-platform/ydb-python-sdk

Tutte le issue di ydb-platform/ydb-python-sdk

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.