microsoft / microsoft/semantic-kernel-java

Java: AzureCognitiveSearchMemoryStoreTests does not adequately mock Azure Cognitive Search Service REST API

Aperta
#61 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

java stale
Lingua principale
Java
Stelle
276
Fork
56
Merge medio
17h 45m
PR unite (30g)
4

Descrizione

AzureCognitiveSearchMemoryStoreTests works by creating its own HttpPipeline for the SearchIndexAsyncClient. The individual tests can supply their own HttpResponse body, but this is not enough since there may be other REST APIs called from SearchIndexAsyncClient that the unit test does not handle. Additionally, the response bodies do not conform to the current API (api-version=2023-07-01-Preview) so the SearchIndexAsyncClient cannot deserialize the responses.

So, what I think needs to be done is to have broader handling of the requests, allowing the individual test to provide specific responses (as required) for the HTTP method and REST endpoint being invoked.

Was:
AzureCognitiveSearchMemory needs better unit test coverage, including negative tests, i.e., response is something other than HTTP 200.

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 con AzureCognitiveSearchMemoryStoreTests e analizza il modo in cui il suo HttpPipeline personalizzato gestisce le richieste per SearchIndexAsyncClient. Traccia i metodi REST e gli endpoint invocati, quindi aggiorna la gestione dei test in modo che i singoli test possano fornire risposte specifiche per endpoint che corrispondano a api-version=2023-07-01-Preview e vengano deserializzate correttamente.

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

Valutazione

Stack tecnologico
azure, java
Ambito
api, testing
Tipo di issue
Refactoring
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.