microsoft / microsoft/semantic-kernel-java
Java: AzureCognitiveSearchMemoryStoreTests does not adequately mock Azure Cognitive Search Service REST API
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Java
- Estrellas
- 276
- Forks
- 56
- Merge medio
- 17 h 45 min
- PR fusionados (30 d)
- 4
Descripción
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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con AzureCognitiveSearchMemoryStoreTests e inspecciona cómo su HttpPipeline personalizado gestiona las solicitudes para SearchIndexAsyncClient. Rastrea los métodos REST y los endpoints invocados, y después actualiza la gestión de las pruebas para que las pruebas individuales puedan proporcionar respuestas específicas del endpoint que coincidan con api-version=2023-07-01-Preview y se deserialicen correctamente.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- azure, java
- Área
- api, testing
- Tipo de issue
- Refactorización
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100