Skip to content

Commit f9ca475

Browse files
mgornyxrmx
andauthored
Use @pytest.mark.flaky decorator instead of @flaky.flaky (#4700)
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 <[email protected]> Co-authored-by: Riccardo Magliocchetti <[email protected]>
1 parent eb1a4c5 commit f9ca475

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opentelemetry-sdk/tests/metrics/test_periodic_exporting_metric_reader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from typing import Optional, Sequence
2323
from unittest.mock import Mock
2424

25-
from flaky import flaky
25+
import pytest
2626

2727
from opentelemetry.sdk.metrics import Counter, MetricsTimeoutError
2828
from opentelemetry.sdk.metrics._internal import _Counter
@@ -194,7 +194,7 @@ def test_ticker_value_exception_on_negative(self):
194194
export_interval_millis=-100,
195195
)
196196

197-
@flaky(max_runs=3, min_passes=1)
197+
@pytest.mark.flaky(max_runs=3, min_passes=1)
198198
def test_ticker_collects_metrics(self):
199199
exporter = FakeMetricsExporter()
200200

0 commit comments

Comments
 (0)