microsoft / microsoft/semantic-kernel-java
Java: AzureCognitiveSearchMemoryStoreTests does not adequately mock Azure Cognitive Search Service REST API
Personne n'a encore pris cette issue.
- Langage dominant
- Java
- Étoiles
- 276
- Forks
- 56
- Merge moyen
- 17 h 45 min
- PR mergées (30 j)
- 4
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par AzureCognitiveSearchMemoryStoreTests et examinez comment son HttpPipeline personnalisé traite les requêtes pour SearchIndexAsyncClient. Suivez les méthodes REST et les endpoints invoqués, puis mettez à jour la gestion des tests afin que chaque test puisse fournir des réponses spécifiques à l’endpoint qui correspondent à api-version=2023-07-01-Preview et se désérialisent correctement.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- azure, java
- Domaine
- api, testing
- Type d'issue
- Refactorisation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100