microsoft / microsoft/semantic-kernel-java
Java: AzureCognitiveSearchMemoryStoreTests does not adequately mock Azure Cognitive Search Service REST API
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 276
- Fork
- 56
- Merge trung bình
- 17 giờ 45 phút
- Pull request đã merge (30 ngày)
- 4
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với AzureCognitiveSearchMemoryStoreTests và kiểm tra cách HttpPipeline tùy chỉnh của nó xử lý các yêu cầu cho SearchIndexAsyncClient. Truy vết các phương thức REST và endpoint được gọi, sau đó cập nhật phần xử lý kiểm thử để các kiểm thử riêng lẻ có thể cung cấp các phản hồi dành riêng cho endpoint, khớp với api-version=2023-07-01-Preview và được deserialize thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- azure, java
- Lĩnh vực
- api, testing
- Loại issue
- Tái cấu trúc
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100