googleapis / googleapis/google-cloud-python

tests/unit: test_metrics_emission_with_failure_attempt fails due to lack of "intercept"

Đang mở
#15,897 1 bình luận 0 reaction 2 người được giao Được giao cho @lszinv Xem trên GitHub
api: spanner
Ngôn ngữ chính
Python
Star
5.4k
Fork
1.8k
Merge trung bình
3 ngày 4 giờ
Pull request đã merge (30 ngày)
122

Mô tả

This is the failure output

```shell
_________________________________________________ test_metrics_emission_with_failure_attempt _________________________________________________

patched_client =

def test_metrics_emission_with_failure_attempt(patched_client):
instance = patched_client.instance("test-instance")
database = instance.database("example-db")
factory = SpannerMetricsTracerFactory()

assert factory.enabled

transport = database.spanner_api._transport
metrics_interceptor = transport._metrics_interceptor
> original_intercept = metrics_interceptor.intercept
E AttributeError: 'NoneType' object has no attribute 'intercept'

tests/unit/test_metrics.py:58: AttributeError
------------------------------------------------------------- Captured log setup -------------------------------------------------------------
WARNING opentelemetry.metrics._internal:__init__.py:864 Overriding of current MeterProvider is not allowed
----------------------------------------------------------- Captured log teardown ------------------------------------------------------------
WARNING opentelemetry.metrics._internal:__init__.py:864 Overriding of current MeterProvider is not allowed
============================================================== warnings summary ==============================================================
```

Hướng dẫn đóng góp

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

Đánh giá

Issue này chưa được đánh giá.

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.