microsoft / microsoft/semantic-kernel-java

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

Đang mở
#61 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

java stale
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

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. 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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.