From 1a6b074c2c7e800ead43ff6273097fa3f4756f31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 26 Jul 2025 12:37:53 +0200 Subject: [PATCH] Use `@pytest.mark.flaky` decorator instead of `@flaky.flaky` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the modern `@pytest.mark.flaky` decorator over `@flaky.flaky` in tests. This avoids typing issues, and makes the tests compatible with other implementations of that decorator, such as `pytest-rerunfailures`. Signed-off-by: Michał Górny --- .../tests/metrics/test_periodic_exporting_metric_reader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opentelemetry-sdk/tests/metrics/test_periodic_exporting_metric_reader.py b/opentelemetry-sdk/tests/metrics/test_periodic_exporting_metric_reader.py index 8aa89e72910..8722effe385 100644 --- a/opentelemetry-sdk/tests/metrics/test_periodic_exporting_metric_reader.py +++ b/opentelemetry-sdk/tests/metrics/test_periodic_exporting_metric_reader.py @@ -22,7 +22,7 @@ from typing import Optional, Sequence from unittest.mock import Mock -from flaky import flaky +import pytest from opentelemetry.sdk.metrics import Counter, MetricsTimeoutError from opentelemetry.sdk.metrics._internal import _Counter @@ -194,7 +194,7 @@ def test_ticker_value_exception_on_negative(self): export_interval_millis=-100, ) - @flaky(max_runs=3, min_passes=1) + @pytest.mark.flaky(max_runs=3, min_passes=1) def test_ticker_collects_metrics(self): exporter = FakeMetricsExporter()