diff --git a/pytest_tests/testsuites/replication/test_replication.py b/pytest_tests/testsuites/replication/test_replication.py index e62c1ac1..ca2e7326 100644 --- a/pytest_tests/testsuites/replication/test_replication.py +++ b/pytest_tests/testsuites/replication/test_replication.py @@ -8,6 +8,7 @@ from frostfs_testlib.shell import Shell from frostfs_testlib.steps.cli.container import create_container, delete_container from frostfs_testlib.steps.cli.object import delete_object, head_object, put_object from frostfs_testlib.storage.cluster import Cluster +from frostfs_testlib.storage.controllers.cluster_state_controller import ClusterStateController from frostfs_testlib.testing.cluster_test_base import ClusterTestBase from frostfs_testlib.utils.file_utils import generate_file @@ -16,9 +17,15 @@ logger = logging.getLogger("NeoLogger") OBJECT_ATTRIBUTES = {"common_key": "common_value"} WAIT_FOR_REPLICATION = 60 - +# Adding failover mark because it may make cluster unhealthy +@pytest.mark.failover @pytest.mark.replication class TestReplication(ClusterTestBase): + @pytest.fixture(autouse=True) + def start_stopped_nodes_after_test(self, cluster_state_controller: ClusterStateController): + yield + cluster_state_controller.start_stopped_hosts() + @pytest.mark.parametrize( "object_size", [pytest.lazy_fixture("simple_object_size"), pytest.lazy_fixture("complex_object_size")], @@ -31,7 +38,7 @@ class TestReplication(ClusterTestBase): client_shell: Shell, cluster: Cluster, object_size, - cluster_state_controller, + cluster_state_controller: ClusterStateController, ): nodes_count = len(cluster.cluster_nodes) node_for_rep = random.choice(cluster.cluster_nodes) @@ -88,6 +95,7 @@ class TestReplication(ClusterTestBase): ) with allure.step("Cleanup"): delete_object( + wallet=default_wallet, cid=cid, oid=oid, shell=client_shell, @@ -95,6 +103,7 @@ class TestReplication(ClusterTestBase): ) delete_container( + wallet=default_wallet, cid=cid, shell=client_shell, endpoint=cluster.default_rpc_endpoint,