microsoft / microsoft/semantic-kernel-java
Java: AzureCognitiveSearchMemoryStoreTests does not adequately mock Azure Cognitive Search Service REST API
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 276
- 派生
- 56
- 平均合并
- 17 小时 45 分钟
- 30 天内合并 PR
- 4
描述
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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 AzureCognitiveSearchMemoryStoreTests 开始,检查其自定义 HttpPipeline 如何处理针对 SearchIndexAsyncClient 的请求。跟踪调用的 REST 方法和端点,然后更新测试处理逻辑,使各个测试能够提供与 api-version=2023-07-01-Preview 匹配并且可以成功反序列化的端点特定响应。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- azure, java
- 领域
- api, testing
- Issue 类型
- 重构
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100