diff --git a/bin/tests/system/autosign/tests_sh_autosign.py b/bin/tests/system/autosign/tests_sh_autosign.py index 9b305e0c6d..8ac8364393 100644 --- a/bin/tests/system/autosign/tests_sh_autosign.py +++ b/bin/tests/system/autosign/tests_sh_autosign.py @@ -11,8 +11,6 @@ import pytest -import isctest.mark - pytestmark = pytest.mark.extra_artifacts( [ "active.key", @@ -147,6 +145,6 @@ pytestmark = pytest.mark.extra_artifacts( ) -@isctest.mark.flaky(max_runs=2) +@pytest.mark.flaky(max_runs=2) def test_autosign(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/dnstap/tests_sh_dnstap.py b/bin/tests/system/dnstap/tests_sh_dnstap.py index d1de2e0efa..1197960ffd 100644 --- a/bin/tests/system/dnstap/tests_sh_dnstap.py +++ b/bin/tests/system/dnstap/tests_sh_dnstap.py @@ -11,6 +11,8 @@ import pytest +import isctest.mark + pytestmark = pytest.mark.extra_artifacts( [ "dig.out*", @@ -26,6 +28,6 @@ pytestmark = pytest.mark.extra_artifacts( ) -@isctest.mark.flaky(max_runs=2, rerun_filter=isctest.mark.is_host_freebsd_13) +@pytest.mark.flaky(max_runs=2, rerun_filter=isctest.mark.is_host_freebsd_13) def test_dnstap(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/fetchlimit/tests_sh_fetchlimit.py b/bin/tests/system/fetchlimit/tests_sh_fetchlimit.py index 26ea079585..e057fb831f 100644 --- a/bin/tests/system/fetchlimit/tests_sh_fetchlimit.py +++ b/bin/tests/system/fetchlimit/tests_sh_fetchlimit.py @@ -24,9 +24,7 @@ pytestmark = pytest.mark.extra_artifacts( ] ) -import isctest.mark - -@isctest.mark.flaky(max_runs=3) +@pytest.mark.flaky(max_runs=3) def test_fetchlimit(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/isctest/mark.py b/bin/tests/system/isctest/mark.py index 25408977d7..c04f8a84e2 100644 --- a/bin/tests/system/isctest/mark.py +++ b/bin/tests/system/isctest/mark.py @@ -87,20 +87,3 @@ softhsm2_environment = pytest.mark.skipif( ), reason="SOFTHSM2_CONF and SOFTHSM2_MODULE environmental variables must be set and pkcs11-tool and softhsm2-util tools present", ) - -try: - import flaky as flaky_pkg # type: ignore -except ModuleNotFoundError: - # In case the flaky package is not installed, run the tests as usual - # without any attempts to re-run them. - # pylint: disable=unused-argument - def flaky(*args, **kwargs): - """Mock decorator that doesn't do anything special, just returns the function.""" - - def wrapper(wrapped_obj): - return wrapped_obj - - return wrapper - -else: - flaky = flaky_pkg.flaky diff --git a/bin/tests/system/mkeys/tests_sh_mkeys.py b/bin/tests/system/mkeys/tests_sh_mkeys.py index 08feed39fd..d809d105d9 100644 --- a/bin/tests/system/mkeys/tests_sh_mkeys.py +++ b/bin/tests/system/mkeys/tests_sh_mkeys.py @@ -11,7 +11,6 @@ import pytest -import isctest.mark pytestmark = pytest.mark.extra_artifacts( [ @@ -48,6 +47,6 @@ pytestmark = pytest.mark.extra_artifacts( ) -@isctest.mark.flaky(max_runs=2) # GL#3098 +@pytest.mark.flaky(max_runs=2) # GL#3098 def test_mkeys(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/nsupdate/tests_sh_nsupdate.py b/bin/tests/system/nsupdate/tests_sh_nsupdate.py index 7859c19314..f3ddfe2c01 100644 --- a/bin/tests/system/nsupdate/tests_sh_nsupdate.py +++ b/bin/tests/system/nsupdate/tests_sh_nsupdate.py @@ -13,8 +13,6 @@ import platform import pytest -import isctest.mark - pytestmark = pytest.mark.extra_artifacts( [ "Kxxx*", @@ -80,6 +78,6 @@ pytestmark = pytest.mark.extra_artifacts( MAX_RUNS = 2 if platform.system() == "FreeBSD" else 1 # GL#3846 -@isctest.mark.flaky(max_runs=MAX_RUNS) +@pytest.mark.flaky(max_runs=MAX_RUNS) def test_nsupdate(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/qmin/tests_sh_qmin.py b/bin/tests/system/qmin/tests_sh_qmin.py index 2d9f90b4db..1116f7ec6c 100644 --- a/bin/tests/system/qmin/tests_sh_qmin.py +++ b/bin/tests/system/qmin/tests_sh_qmin.py @@ -11,8 +11,6 @@ import pytest -import isctest.mark - pytestmark = pytest.mark.extra_artifacts( [ "dig.out.*", @@ -25,6 +23,6 @@ pytestmark = pytest.mark.extra_artifacts( # The qmin test is inherently unstable, see GL #904 for details. -@isctest.mark.flaky(max_runs=3) +@pytest.mark.flaky(max_runs=3) def test_qmin(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/reclimit/tests_sh_reclimit.py b/bin/tests/system/reclimit/tests_sh_reclimit.py index 6a0ab31556..d22d10a523 100644 --- a/bin/tests/system/reclimit/tests_sh_reclimit.py +++ b/bin/tests/system/reclimit/tests_sh_reclimit.py @@ -11,8 +11,6 @@ import pytest -import isctest.mark - pytestmark = pytest.mark.extra_artifacts( [ "dig.out.*", @@ -27,6 +25,6 @@ pytestmark = pytest.mark.extra_artifacts( # The reclimit is known to be quite unstable. GL #1587 -@isctest.mark.flaky(max_runs=2) +@pytest.mark.flaky(max_runs=2) def test_reclimit(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/rrl/tests_sh_rrl.py b/bin/tests/system/rrl/tests_sh_rrl.py index 99be723c93..12ce0ca29f 100644 --- a/bin/tests/system/rrl/tests_sh_rrl.py +++ b/bin/tests/system/rrl/tests_sh_rrl.py @@ -11,8 +11,6 @@ import pytest -import isctest.mark - pytestmark = pytest.mark.extra_artifacts( [ "*mdig.out*", @@ -24,6 +22,6 @@ pytestmark = pytest.mark.extra_artifacts( # The rrl is known to be quite unstable. GL #172 -@isctest.mark.flaky(max_runs=2) +@pytest.mark.flaky(max_runs=2) def test_rrl(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/serve-stale/tests_sh_serve_stale.py b/bin/tests/system/serve-stale/tests_sh_serve_stale.py index b55336d2b6..48b8cf1f17 100644 --- a/bin/tests/system/serve-stale/tests_sh_serve_stale.py +++ b/bin/tests/system/serve-stale/tests_sh_serve_stale.py @@ -11,8 +11,6 @@ import pytest -import isctest.mark - pytestmark = pytest.mark.extra_artifacts( [ "dig.out.*", @@ -26,6 +24,6 @@ pytestmark = pytest.mark.extra_artifacts( ) -@isctest.mark.flaky(max_runs=2) +@pytest.mark.flaky(max_runs=2) def test_serve_stale(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/statistics/tests_sh_statistics.py b/bin/tests/system/statistics/tests_sh_statistics.py index 2a0399b8a9..6cbe3d59ab 100644 --- a/bin/tests/system/statistics/tests_sh_statistics.py +++ b/bin/tests/system/statistics/tests_sh_statistics.py @@ -11,8 +11,6 @@ import pytest -import isctest.mark - pytestmark = pytest.mark.extra_artifacts( [ "curl.out.*", @@ -26,6 +24,6 @@ pytestmark = pytest.mark.extra_artifacts( ) -@isctest.mark.flaky(max_runs=2) # GL#1621 +@pytest.mark.flaky(max_runs=2) # GL#1621 def test_statistics(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/statschannel/tests_json.py b/bin/tests/system/statschannel/tests_json.py index 6446fd8a75..105e10d445 100755 --- a/bin/tests/system/statschannel/tests_json.py +++ b/bin/tests/system/statschannel/tests_json.py @@ -119,6 +119,6 @@ def test_zone_with_many_keys_json(statsport): ) -@isctest.mark.flaky(max_runs=2) +@pytest.mark.flaky(max_runs=2) def test_traffic_json(statsport): generic.test_traffic(fetch_traffic_json, statsip="10.53.0.2", statsport=statsport) diff --git a/bin/tests/system/statschannel/tests_xml.py b/bin/tests/system/statschannel/tests_xml.py index e0a6737320..94c0cc1fcc 100755 --- a/bin/tests/system/statschannel/tests_xml.py +++ b/bin/tests/system/statschannel/tests_xml.py @@ -148,6 +148,6 @@ def test_zone_with_many_keys_xml(statsport): ) -@isctest.mark.flaky(max_runs=2) +@pytest.mark.flaky(max_runs=2) def test_traffic_xml(statsport): generic.test_traffic(fetch_traffic_xml, statsip="10.53.0.2", statsport=statsport) diff --git a/bin/tests/system/timeouts/tests_tcp_timeouts.py b/bin/tests/system/timeouts/tests_tcp_timeouts.py index 1fe1088a69..cb8defa71e 100644 --- a/bin/tests/system/timeouts/tests_tcp_timeouts.py +++ b/bin/tests/system/timeouts/tests_tcp_timeouts.py @@ -67,7 +67,7 @@ def test_initial_timeout(named_port): raise EOFError from e -@isctest.mark.flaky(max_runs=2, rerun_filter=isctest.mark.is_host_freebsd_13) +@pytest.mark.flaky(max_runs=2, rerun_filter=isctest.mark.is_host_freebsd_13) def test_idle_timeout(named_port): # # The idle timeout is 5 seconds, so the third message should fail @@ -189,7 +189,7 @@ def test_long_axfr(named_port): assert soa is not None -@isctest.mark.flaky(max_runs=3) +@pytest.mark.flaky(max_runs=3) def test_send_timeout(named_port): with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: sock.connect(("10.53.0.1", named_port))