Skip to content

Commit

Permalink
Fix log record tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval committed Sep 4, 2024
1 parent dcb44f0 commit c0787ab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions opentelemetry-sdk/tests/metrics/test_view_instrument_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from opentelemetry.sdk.metrics._internal.sdk_configuration import (
SdkConfiguration,
)
from opentelemetry.sdk.metrics._internal.view import _default_reservoir_factory
from opentelemetry.sdk.metrics.export import AggregationTemporality
from opentelemetry.sdk.metrics.view import (
DefaultAggregation,
Expand Down Expand Up @@ -296,7 +297,7 @@ def test_collect_resets_start_time_unix_nano(self, mock_time_ns):
)
)
view_instrument_match._view._aggregation._create_aggregation.assert_called_with(
instrument, {"foo": "bar0"}, start_time_unix_nano
instrument, {"foo": "bar0"}, _default_reservoir_factory, start_time_unix_nano
)
collection_start_time_unix_nano = time_ns()
collected_data_points = view_instrument_match.collect(
Expand All @@ -316,7 +317,7 @@ def test_collect_resets_start_time_unix_nano(self, mock_time_ns):
)
)
view_instrument_match._view._aggregation._create_aggregation.assert_called_with(
instrument, {"foo": "bar1"}, 1
instrument, {"foo": "bar1"}, _default_reservoir_factory, 1
)
collection_start_time_unix_nano = time_ns()
collected_data_points = view_instrument_match.collect(
Expand All @@ -338,7 +339,7 @@ def test_collect_resets_start_time_unix_nano(self, mock_time_ns):
)
)
view_instrument_match._view._aggregation._create_aggregation.assert_called_with(
instrument, {"foo": "bar"}, 2
instrument, {"foo": "bar"}, _default_reservoir_factory, 2
)
# No new calls to _create_aggregation because attributes remain the same
view_instrument_match.consume_measurement(
Expand Down

0 comments on commit c0787ab

Please sign in to comment.