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

Flaky test: test_polling_backoff_recovery_and_revoked_token times out on Windows CI

Aperta Adatta ai principianti
#420 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
testing-qa

Direzione di ricerca

Inizia con tests/channels/test_telegram.py::test_polling_backoff_recovery_and_revoked_token, in particolare con asyncio.wait_for(ch.run(), 5) alla riga 524, e leggi come il test simula le risposte del polling e si ferma quando il token viene revocato. Esegui questo test e verifica che termini in modo affidabile su Windows CI senza dipendere dalla riesecuzione instabile.

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

Descrizione

area: channels bug flaky

tests/channels/test_telegram.py::test_polling_backoff_recovery_and_revoked_token failed once on Windows CI and passed on a re-run of the same commit.

Where: PR #410, run 39010233496 attempt 1, Engine tests (windows-latest): 1 failed, 2464 passed in 28:49.

What failed: await asyncio.wait_for(ch.run(), 5) (test_telegram.py line 524) hit its 5 second limit: TimeoutError, with the inner task cancelled while it waited on an aiosqlite commit().

Likely cause: the test gives the whole polling loop (six scripted getUpdates replies, four backoffs with a fake sleep, a dispatched update and the revoked-token stop) 5 seconds of wall-clock time. On the Windows runner with -n auto every worker is busy; the same run shows fixture setups of 15 to 24 seconds (test_start_reconnects_saved_channel setup 15.4 s), so 5 seconds for many SQLite commits is not enough there. The logic did not fail; the clock did.

Possible fix: wait on the loop's own end (it stops on the 401) with a generous limit, e.g. 30 s, or drive it step by step instead of a wall-clock budget.

Until fixed it is marked @pytest.mark.flaky(reruns=2), and CI's rerun summary lists it whenever it needs a rerun.

Lingua principale
Python
Stelle
702
Fork
113
Merge medio
5h 7m
PR unite (30g)
160

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 existence-master/Sentient

Tutte le issue di existence-master/Sentient

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.