Skip to content

Commit

Permalink
test: use pytest-reruns instead of flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
chaen committed Mar 5, 2024
1 parent 3eef22c commit e4ad67a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/DIRAC/Core/Utilities/test/Test_Profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from subprocess import Popen

import pytest
from flaky import flaky

import DIRAC
from DIRAC.Core.Utilities.Profiler import Profiler
Expand Down Expand Up @@ -78,7 +77,7 @@ def test_base():
assert resWC["Value"] >= res["Value"]


@flaky(max_runs=10, min_passes=2)
@pytest.mark.flaky(reruns=10)
def test_cpuUsage():
mainProcess = Popen(
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Test SubLogger
"""
import pytest
from flaky import flaky
from DIRAC.FrameworkSystem.private.standardLogging.LogLevels import LogLevels


Expand Down Expand Up @@ -52,7 +51,7 @@ def test_getSubLoggerObject():
# Run the tests for all the log levels and exceptions
# We may need to rerun the test if we are unlucky and the timestamps
# don't match
@flaky(max_runs=3)
@pytest.mark.flaky(reruns=3)
@pytest.mark.parametrize("logLevel", ["exception"] + [lvl.lower() for lvl in LogLevels.getLevelNames()])
def test_localSubLoggerObject(logLevel):
"""
Expand Down

0 comments on commit e4ad67a

Please sign in to comment.