From a84b6922f79e98e61eec5a7cc2949e3ce58ab290 Mon Sep 17 00:00:00 2001 From: antazoey Date: Tue, 5 Nov 2024 09:09:22 -0600 Subject: [PATCH] test: rerun random URL connection test if need-be (#2373) --- setup.py | 1 + tests/functional/geth/test_network_manager.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/setup.py b/setup.py index 932989e652..8b2f7d5e57 100644 --- a/setup.py +++ b/setup.py @@ -16,6 +16,7 @@ "pytest-cov>=4.0.0,<5", # Coverage analyzer plugin "pytest-mock", # For creating mocks "pytest-benchmark", # For performance tests + "pytest-rerunfailures", # For flakey tests "pytest-timeout>=2.2.0,<3", # For avoiding timing out during tests "hypothesis>=6.2.0,<7.0", # Strategy-based fuzzer "hypothesis-jsonschema==0.19.0", # JSON Schema fuzzer extension diff --git a/tests/functional/geth/test_network_manager.py b/tests/functional/geth/test_network_manager.py index 8c2d5986aa..a0949ee245 100644 --- a/tests/functional/geth/test_network_manager.py +++ b/tests/functional/geth/test_network_manager.py @@ -39,6 +39,8 @@ def test_fork_upstream_provider(networks, mock_geth_sepolia, geth_provider, mock del geth_provider.provider_settings["uri"] +# NOTE: Test is flakey because random URLs may be offline when test runs; avoid CI failure. +@pytest.mark.flaky(reruns=5) @geth_process_test @pytest.mark.parametrize( "connection_str", ("moonbeam:moonriver", "https://moonriver.api.onfinality.io/public")