test: stop/start servers concurrently in the recovery procedure tests

This change makes these tests a bit faster.
This commit is contained in:
Patryk Jędrzejczak
2025-10-07 17:46:00 +02:00
parent 4581c72430
commit dbd998bc15
3 changed files with 4 additions and 8 deletions

View File

@@ -86,8 +86,7 @@ async def test_raft_recovery_during_join(manager: ManagerClient):
dead_hosts.append(failed_server_host)
logging.info(f'Killing {dead_servers}')
for srv in dead_servers:
await manager.server_stop(server_id=srv.server_id)
await asyncio.gather(*(manager.server_stop(server_id=srv.server_id) for srv in dead_servers))
logging.info(f'Unblocking the topology coordinator on server {coordinator}')
await manager.api.message_injection(coordinator.ip_addr, 'delay_node_bootstrap')

View File

@@ -79,12 +79,10 @@ async def test_raft_recovery_entry_lose(manager: ManagerClient):
logging.info(f'Found group 0 schema version {v_group0}')
logging.info(f'Killing {dead_servers}')
for srv in dead_servers:
await manager.server_stop(server_id=srv.server_id)
await asyncio.gather(*(manager.server_stop(server_id=srv.server_id) for srv in dead_servers))
logging.info(f'Starting {live_servers}')
for srv in live_servers:
await manager.server_start(srv.server_id)
await asyncio.gather(*(manager.server_start(server_id=srv.server_id) for srv in live_servers))
cql = await reconnect_driver(manager)
hosts = await wait_for_cql_and_get_hosts(cql, live_servers, time.time() + 60)

View File

@@ -84,8 +84,7 @@ async def test_raft_recovery_user_data(manager: ManagerClient, remove_dead_nodes
await asyncio.sleep(1)
logging.info(f'Killing {dead_servers}')
for srv in dead_servers:
await manager.server_stop(server_id=srv.server_id)
await asyncio.gather(*(manager.server_stop(server_id=srv.server_id) for srv in dead_servers))
logging.info('Starting the recovery procedure')