From a89facbc74ec728fc960305f643322c269f312ea Mon Sep 17 00:00:00 2001 From: Emil Maskovsky Date: Tue, 16 Jul 2024 13:01:13 +0200 Subject: [PATCH] test: raft: fix the flaky `test_raft_recovery_stuck` Use the rolling restart to avoid spurious driver reconnects. This can be eventually reverted once the scylladb/python-driver#295 is fixed. Fixes scylladb/scylladb#19154 --- test/topology_custom/test_raft_recovery_stuck.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/topology_custom/test_raft_recovery_stuck.py b/test/topology_custom/test_raft_recovery_stuck.py index 25749c146e..cfec7d495b 100644 --- a/test/topology_custom/test_raft_recovery_stuck.py +++ b/test/topology_custom/test_raft_recovery_stuck.py @@ -77,8 +77,7 @@ async def test_recover_stuck_raft_recovery(request, manager: ManagerClient): await asyncio.gather(*(enter_recovery_state(cql, h) for h in hosts)) logging.info(f"Restarting {others}") - await asyncio.gather(*(manager.server_restart(srv.server_id) for srv in others)) - cql = await reconnect_driver(manager) + await manager.rolling_restart(others) logging.info(f"{others} restarted, waiting until driver reconnects to them") hosts = await wait_for_cql_and_get_hosts(cql, others, time.time() + 60) @@ -100,11 +99,11 @@ async def test_recover_stuck_raft_recovery(request, manager: ManagerClient): logging.info(f"Removing {srv1} using {others[0]}") await manager.remove_node(others[0].server_id, srv1.server_id) - logging.info(f"Deleting Raft data and upgrade state on {hosts} and restarting") + logging.info(f"Deleting Raft data and upgrade state on {hosts}") await asyncio.gather(*(delete_raft_data_and_upgrade_state(cql, h) for h in hosts)) - await asyncio.gather(*(manager.server_restart(srv.server_id) for srv in others)) - cql = await reconnect_driver(manager) + logging.info(f"Restarting {others}") + await manager.rolling_restart(others) logging.info(f"Cluster restarted, waiting until driver reconnects to {others}") hosts = await wait_for_cql_and_get_hosts(cql, others, time.time() + 60)