Skip to content

Commit

Permalink
Try pytest-retry instead of flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
Yngve S. Kristiansen committed Mar 4, 2024
1 parent 3e41e21 commit 5fbfda5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ Repository = "https://github.com/equinor/ert"
dev = [
"decorator",
"furo",
"flaky",
"hypothesis",
"jsonpath_ng",
"jupytext",
Expand All @@ -107,10 +106,11 @@ dev = [
"pytest-mpl",
"pytest-qt",
"pytest-raises",
"pytest-retry",
"pytest-snapshot",
"pytest-timeout",
"pytest-xdist",
"pytest>6,<8.1.0",
"pytest>6",
"resfo",
"scikit-learn",
"sphinx",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import numpy as np
import pytest
import xtgeo
from flaky import flaky

from ert.cli import ENSEMBLE_SMOOTHER_MODE
from ert.libres_facade import LibresFacade
Expand Down Expand Up @@ -179,7 +178,7 @@ def test_surface_param_update(tmpdir):

@pytest.mark.integration_test
@pytest.mark.limit_memory("110 MB")
@flaky(max_runs=5, min_passes=1)
@pytest.mark.flaky(retries=5)
def test_field_param_memory(tmpdir):
with tmpdir.as_cwd():
# Setup is done in a subprocess so that memray does not pick up the allocations
Expand Down
3 changes: 1 addition & 2 deletions tests/performance_tests/test_memory_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import py
import pytest
import xarray as xr
from flaky import flaky

from ert.analysis import smoother_update
from ert.config import ErtConfig, SummaryConfig
Expand Down Expand Up @@ -40,7 +39,7 @@ def poly_template(monkeypatch):
yield folder


@flaky(max_runs=5, min_passes=1)
@pytest.mark.flaky(retries=5)
@pytest.mark.limit_memory("130 MB")
@pytest.mark.integration_test
def test_memory_smoothing(poly_template):
Expand Down
5 changes: 2 additions & 3 deletions tests/unit_tests/scheduler/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import pytest
from cloudevents.http import from_json
from flaky import flaky

from ert.constant_filenames import CERT_FILE
from ert.ensemble_evaluator._builder._realization import Realization
Expand Down Expand Up @@ -381,7 +380,7 @@ async def wait(iens):
assert killed_iens == [6, 7, 8, 9]


@flaky(max_runs=5, min_passes=1)
@pytest.mark.flaky(retries=5)
@pytest.mark.parametrize(
"submit_sleep, iens_stride, realization_runtime",
[(0, 1, 0.1), (0.1, 1, 0.1), (0.1, 1, 0), (0.1, 2, 0)],
Expand Down Expand Up @@ -424,7 +423,7 @@ async def wait():
assert max(deltas) <= submit_sleep + 0.1


@flaky(max_runs=5, min_passes=1)
@pytest.mark.flaky(retries=5)
@pytest.mark.parametrize(
"submit_sleep, realization_max_runtime, max_running",
[
Expand Down

0 comments on commit 5fbfda5

Please sign in to comment.