sdk-testing assertj failure messages report the wrong value or type
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 84/100
Hướng nghiên cứu
Bắt đầu trong sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/ và kiểm tra HistogramAssert, ExponentialHistogramAssert, MetricAssert và LogRecordDataAssert, sử dụng LongSumAssert.isCumulative() làm điểm so sánh. Sửa các giá trị được báo cáo, các đối số định dạng và cách diễn đạt được mô tả trong issue, sau đó chạy các bài kiểm tra sdk-testing và xác minh rằng các thông báo lỗi khớp với văn bản mong đợi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Some opentelemetry-sdk-testing assertj failure messages report the wrong value or the wrong field. The pass/fail result is correct, but the message can mislead whoever reads the failing test log.
Steps to reproduce
Call assertThat(metric).hasHistogramSatisfying(h -> h.isCumulative()) on a metric whose histogram uses DELTA temporality.
What did you expect to see?
Expected Histogram to have cumulative aggregation but found <DELTA>, the same shape LongSumAssert.isCumulative() produces.
What did you see instead?
Expected Histogram to have cumulative aggregation but found <CUMULATIVE>. Five places under sdk/testing/src/main/java/io/opentelemetry/sdk/testing/assertj/ are affected:
HistogramAssert.isCumulative(),isDelta()andExponentialHistogramAssert.isDelta()pass the expected constant as an extra format argument, so%sprints the expected value instead of the actual one.HistogramAssert.isDelta()also says "Histgram ... cumulative", andExponentialHistogramAssert.isDelta()says "cumulative".MetricAssert.hasInstrumentationScope()says "to have resource".LogRecordDataAssert.hasSpanContext()says "span context <...> nanos".
What version and what artifacts are you using?
Artifacts: opentelemetry-sdk-testing
Version: main @ ce32c1205
How did you reference these artifacts? N/A (repository source)
Environment
Compiler: Temurin 21
OS: N/A
Additional context
N/A
- Ngôn ngữ chính
- Java
- Star
- 2.5k
- Fork
- 1k
- Merge trung bình
- 2 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 64
Chuẩn bị môi trường
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.
Issue khác của open-telemetry/opentelemetry-java
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
open-telemetry/opentelemetry-java#8870 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
open-telemetry/opentelemetry-java#8869 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
open-telemetry/opentelemetry-java#8867 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
open-telemetry/opentelemetry-java#8843 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
open-telemetry/opentelemetry-java#8688 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của open-telemetry/opentelemetry-java
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
github/copilot-sdk#2793 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Unify jpa4 into orm8Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
enhancement good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100