Azure / Azure/azure-sdk-for-python

test_change_feed_async test fails locally

Aperta
#38,345 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Client Cosmos
Lingua principale
Python
Stelle
5.6k
Fork
3.4k
Merge medio
2g 2h
PR unite (30g)
213

Descrizione

  • Package Name: azure-cosmos
  • Package Version:
  • Operating System: OSX, Windows
  • Python Version: Python 3.12

Describe the bug
The tests under test_change_feed_async.py file fails with the following error message, when it was executed locally. The test passes under CI pipeline, so this wasn't blocking other developers.
azure.core.exceptions.ServiceRequestError: Cannot connect to host ... ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)')]

To Reproduce
Steps to reproduce the behavior:

  1. Open the package azure-sdk-for-python/sdk/cosmos/azure-cosmos from Pycharm
  2. Navigate to the test file located: test/test_change_feed_async.py
  3. Run any tests under TestChangeFeedAsync class, such as test_get_feed_ranges

Expected behavior
Test should pass without any error or exception

Screenshots
Image

Additional context
The temporally workaround was to set DisableSSLVerification to be true in setup() function. This helped developers to add or run more tests under the test class, but this change cannot be pushed, since CI pipeline worked without it.

Guida per i contributori

Apri la guida per i contributori

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.

Direzione di ricerca

Inizia da sdk/cosmos/azure-cosmos/test/test_change_feed_async.py ed esegui localmente TestChangeFeedAsync.test_get_feed_ranges. Confronta l’errore SSL locale con la configurazione CI e determina un modo supportato dal repository per consentire il superamento dei test senza la modifica temporanea DisableSSLVerification; il lavoro è completo quando i test interessati superano l’esecuzione localmente e in CI.

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

Valutazione

Stack tecnologico
azure, python
Ambito
cloud, testing-qa
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.