mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-30 11:36:54 +00:00
test: cluster: remove test_snitch_change
This test checked that it is possible to change DC/rack of a node during restart. This will become explicitly forbidden, so remove the test.
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2024-present ScyllaDB
|
||||
#
|
||||
# SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
|
||||
#
|
||||
|
||||
import pytest
|
||||
import logging
|
||||
import asyncio
|
||||
import time
|
||||
|
||||
from test.pylib.manager_client import ManagerClient
|
||||
from test.pylib.util import wait_for_cql_and_get_hosts
|
||||
from test.cluster.util import reconnect_driver
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_snitch_change(manager: ManagerClient) -> None:
|
||||
""" The test changes snitch from simple to GossipingPropertyFileSnitch one and checks
|
||||
that DC and rack names change accordingly"""
|
||||
s1 = await manager.server_add(config = {"endpoint_snitch": "SimpleSnitch"}, property_file = {'dc': 'DC1', 'rack' : 'R1'})
|
||||
s2 = await manager.server_add(config = {"endpoint_snitch": "SimpleSnitch"}, property_file = {'dc': 'DC1', 'rack' : 'R1'})
|
||||
cql = manager.get_cql()
|
||||
res = await cql.run_async(f"SELECT data_center,rack From system.peers")
|
||||
assert res[0].data_center == "datacenter1" and res[0].rack == "rack1"
|
||||
await manager.server_update_config(s1.server_id, 'endpoint_snitch', 'GossipingPropertyFileSnitch')
|
||||
await manager.server_update_config(s2.server_id, 'endpoint_snitch', 'GossipingPropertyFileSnitch')
|
||||
await manager.server_stop_gracefully(s1.server_id)
|
||||
await manager.server_stop_gracefully(s2.server_id)
|
||||
tasks = [asyncio.create_task(manager.server_start(s1.server_id)), asyncio.create_task(manager.server_start(s2.server_id))]
|
||||
await asyncio.gather(*tasks)
|
||||
cql = await reconnect_driver(manager)
|
||||
await wait_for_cql_and_get_hosts(cql, await manager.running_servers(), time.time() + 60)
|
||||
res = await cql.run_async(f"SELECT data_center,rack From system.peers")
|
||||
assert res[0].data_center == "DC1" and res[0].rack == "R1"
|
||||
Reference in New Issue
Block a user