Skip to content

Commit

Permalink
test: merge topology_experimental_raft into topology_custom
Browse files Browse the repository at this point in the history
This enables tablets in topology_custom, so explicitly
disable them where tests don't support tablets.

Fixed #20193
  • Loading branch information
kostja committed Dec 20, 2024
1 parent 6914892 commit da4bba2
Show file tree
Hide file tree
Showing 41 changed files with 31 additions and 41 deletions.
11 changes: 11 additions & 0 deletions test/topology_custom/suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,29 @@ cluster:
extra_scylla_config_options:
authenticator: AllowAllAuthenticator
authorizer: AllowAllAuthorizer
enable_user_defined_functions: False
enable_tablets: True
run_first:
- test_raft_recovery_stuck
- test_raft_recovery_basic
- test_group0_schema_versioning
- test_tablets_migration
- test_zero_token_nodes_topology_ops
- test_raft_cluster_features
- test_raft_ignore_nodes
- test_tablets
- test_tablets2
skip_in_release:
- test_raft_cluster_features
skip_in_debug:
- test_shutdown_hang
- test_replace
- test_old_ip_notification_repro
- test_node_shutdown_waits_for_pending_requests
- test_cdc_generation_clearing
- test_cdc_generation_publishing
run_in_dev:
- test_raft_ignore_nodes
- test_group0_schema_versioning
- test_different_group0_ids
- test_replace_ignore_nodes
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion test/topology_custom/test_boot_after_ip_change.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ async def test_boot_after_ip_change(manager: ManagerClient) -> None:
Regression test for #14468. Does not apply to Raft-topology mode.
"""
cfg = {'enable_user_defined_functions': False,
'force_gossip_topology_changes': True}
'force_gossip_topology_changes': True,
'enable_tablets': False}
logger.info(f"Booting initial cluster")
servers = [await manager.server_add(config=cfg) for _ in range(2)]
await wait_for_token_ring_and_group0_consistency(manager, time.time() + 30)
Expand Down
5 changes: 3 additions & 2 deletions test/topology_custom/test_different_group0_ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ async def test_different_group0_ids(manager: ManagerClient):
"""

# Consistent topology changes are disabled to use repair based node operations.
scylla_a = await manager.server_add(config={'force_gossip_topology_changes': True})
scylla_b = await manager.server_add(start=False, config={'force_gossip_topology_changes': True})
cfg = {'force_gossip_topology_changes': True, 'enable_tablets': False}
scylla_a = await manager.server_add(config = cfg)
scylla_b = await manager.server_add(start=False, config = cfg)
await manager.server_start(scylla_b.server_id, seeds=[scylla_b.ip_addr])

await manager.server_stop(scylla_b.server_id)
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion test/topology_custom/test_gossip_boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ async def test_gossip_boot(manager: ManagerClient):
"""

cfg = {'error_injections_at_startup': ['gossiper_replicate_sleep'],
'force_gossip_topology_changes': True}
'force_gossip_topology_changes': True,
'enable_tablets': False}

servers = [await manager.server_add(config=cfg, timeout=60) for _ in range(3)]
logs = [await manager.server_open_log(s.server_id) for s in servers]
Expand Down
2 changes: 1 addition & 1 deletion test/topology_custom/test_mv_admission_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from test.topology.conftest import skip_mode
from test.pylib.util import wait_for_view
from test.topology_experimental_raft.test_mv_tablets import pin_the_only_tablet, get_tablet_replicas
from test.topology_custom.test_mv_tablets import pin_the_only_tablet, get_tablet_replicas

from cassandra.cluster import ConsistencyLevel, EXEC_PROFILE_DEFAULT # type: ignore
from cassandra.cqltypes import Int32Type # type: ignore
Expand Down
2 changes: 1 addition & 1 deletion test/topology_custom/test_mv_backlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import pytest
from test.topology.conftest import skip_mode
from test.pylib.util import wait_for_view, wait_for
from test.topology_experimental_raft.test_mv_tablets import pin_the_only_tablet
from test.topology_custom.test_mv_tablets import pin_the_only_tablet
from test.pylib.tablets import get_tablet_replica

logger = logging.getLogger(__name__)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from test.topology.conftest import skip_mode
from test.topology.util import get_topology_coordinator, find_server_by_host_id
from test.topology_experimental_raft.test_mv_tablets import get_tablet_replicas
from test.topology_custom.test_mv_tablets import get_tablet_replicas

logger = logging.getLogger(__name__)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/topology_custom/test_read_repair.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ async def test_incremental_read_repair(data_class, workdir, manager):

host1, host2 = await wait_for_cql_and_get_hosts(cql, [node1, node2], time.time() + 30)

cql.execute("CREATE KEYSPACE ks WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': 2}")
cql.execute("CREATE KEYSPACE ks WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': 2} AND tablets = { 'enabled': false }")
table_schema = f"CREATE TABLE ks.tbl ({data_class.column_spec}) WITH speculative_retry = 'NONE'"
cql.execute(table_schema)

Expand Down
3 changes: 2 additions & 1 deletion test/topology_custom/test_replace_ignore_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ async def test_replace_ignore_nodes(manager: ManagerClient) -> None:
Preferably run it only in one mode e.g. dev.
"""
cfg = {'enable_user_defined_functions': False,
'force_gossip_topology_changes': True}
'force_gossip_topology_changes': True,
'enable_tablets': False}
logger.info(f"Booting initial cluster")
servers = [await manager.server_add(config=cfg) for _ in range(7)]
s2_id = await manager.get_host_id(servers[2].server_id)
Expand Down
3 changes: 2 additions & 1 deletion test/topology_custom/test_table_drop.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ async def test_drop_table_during_streaming_receiver_side(manager: ManagerClient)
'error_injections_at_startup': ['stream_mutation_fragments_table_dropped'],
'enable_repair_based_node_ops': False,
'enable_user_defined_functions': False,
'force_gossip_topology_changes': True
'force_gossip_topology_changes': True,
'enable_tablets': False
}) for _ in range(2)]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion test/topology_custom/test_topology_remove_garbage_group0.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ async def test_remove_garbage_group0_members(manager: ManagerClient):
"""
# 4 servers, one dead
cfg = {'enable_user_defined_functions': False,
'force_gossip_topology_changes': True}
'force_gossip_topology_changes': True,
'enable_tablets': False}
servers = [await manager.server_add(config=cfg) for _ in range(4)]

# Make sure that the driver has connected to all nodes, and they see each other as NORMAL
Expand Down
4 changes: 3 additions & 1 deletion test/topology_custom/test_zero_token_nodes_topology_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ async def test_zero_token_nodes_topology_ops(manager: ManagerClient, tablets_ena
- client requests to normal nodes in the presence of zero-token nodes (2 normal nodes, RF=2, CL=2) succeed
"""
logging.info('Trying to add a zero-token server in the gossip-based topology')
await manager.server_add(config={'join_ring': False, 'force_gossip_topology_changes': True},
await manager.server_add(config={'join_ring': False,
'force_gossip_topology_changes': True,
'enable_tablets': False},
expected_error='the raft-based topology is disabled')

normal_cfg = {'enable_tablets': tablets_enabled}
Expand Down
Empty file.
9 changes: 0 additions & 9 deletions test/topology_experimental_raft/conftest.py

This file was deleted.

20 changes: 0 additions & 20 deletions test/topology_experimental_raft/suite.yaml

This file was deleted.

0 comments on commit da4bba2

Please sign in to comment.