Skip to content

Turn off mixed version tests against Khepri #11663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/test-plugin-mixed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ jobs:
- 26
metadata_store:
- mnesia
- khepri
# Khepri is currently skipped because Khepri is an unstable feature: we don't guarantee upgrability.
# Mixed-version tests currently fail with Khepri because of a new machine version introduced in
# Khepri v0.14.0.
# - khepri
include:
- erlang_version: 26
elixir_version: 1.15
Expand Down
19 changes: 13 additions & 6 deletions deps/rabbit/test/cluster_minority_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,20 @@ suite() ->
%% Testsuite setup/teardown.
%% -------------------------------------------------------------------

init_per_suite(Config0) ->
init_per_suite(Config) ->
rabbit_ct_helpers:log_environment(),
Config = rabbit_ct_helpers:set_config(Config0, [{metadata_store, khepri}]),
rabbit_ct_helpers:run_setup_steps(Config,
[
fun rabbit_ct_broker_helpers:configure_dist_proxy/1
]).
case rabbit_ct_broker_helpers:configured_metadata_store(Config) of
mnesia ->
%% This SUITE is meant to test how Khepri behaves in a minority,
%% so mnesia should be skipped.
{skip, "Minority testing not supported by mnesia"};
_ ->
rabbit_ct_helpers:run_setup_steps(
Config,
[
fun rabbit_ct_broker_helpers:configure_dist_proxy/1
])
end.

end_per_suite(Config) ->
rabbit_ct_helpers:run_teardown_steps(Config).
Expand Down
16 changes: 13 additions & 3 deletions deps/rabbit/test/clustering_management_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,20 @@ init_per_suite(Config) ->
end_per_suite(Config) ->
rabbit_ct_helpers:run_teardown_steps(Config).

init_per_group(mnesia_store, Config) ->
rabbit_ct_helpers:set_config(Config, [{metadata_store, mnesia}]);
init_per_group(khepri_store, Config) ->
rabbit_ct_helpers:set_config(Config, [{metadata_store, khepri}]);
case rabbit_ct_broker_helpers:configured_metadata_store(Config) of
mnesia ->
{skip, "These tests target Khepri"};
_ ->
Config
end;
init_per_group(mnesia_store, Config) ->
case rabbit_ct_broker_helpers:configured_metadata_store(Config) of
{khepri, _} ->
{skip, "These tests target mnesia"};
_ ->
Config
end;
init_per_group(unclustered_2_nodes, Config) ->
rabbit_ct_helpers:set_config(Config, [{rmq_nodes_clustered, false}]);
init_per_group(unclustered_3_nodes, Config) ->
Expand Down
14 changes: 12 additions & 2 deletions deps/rabbit/test/clustering_recovery_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,19 @@ end_per_suite(Config) ->
rabbit_ct_helpers:run_teardown_steps(Config).

init_per_group(khepri_store, Config) ->
rabbit_ct_helpers:set_config(Config, [{metadata_store, khepri}]);
case rabbit_ct_broker_helpers:configured_metadata_store(Config) of
mnesia ->
{skip, "These tests target Khepri"};
_ ->
Config
end;
init_per_group(mnesia_store, Config) ->
rabbit_ct_helpers:set_config(Config, [{metadata_store, mnesia}]);
case rabbit_ct_broker_helpers:configured_metadata_store(Config) of
{khepri, _} ->
{skip, "These tests target mnesia"};
_ ->
Config
end;
init_per_group(clustered_3_nodes, Config) ->
rabbit_ct_helpers:set_config(Config, [{rmq_nodes_clustered, true}]);
init_per_group(clustered_5_nodes, Config) ->
Expand Down
9 changes: 8 additions & 1 deletion deps/rabbit/test/metadata_store_clustering_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ cluster_size_3_tests() ->

init_per_suite(Config) ->
rabbit_ct_helpers:log_environment(),
rabbit_ct_helpers:run_setup_steps(Config, []).
case rabbit_ct_helpers:is_mixed_versions() of
true ->
%% Khepri is not yet compatible with mixed version testing and this
%% suite enables Khepri.
{skip, "This suite does not yet support mixed version testing"};
false ->
rabbit_ct_helpers:run_setup_steps(Config, [])
end.

end_per_suite(Config) ->
rabbit_ct_helpers:run_teardown_steps(Config).
Expand Down
1 change: 0 additions & 1 deletion deps/rabbitmq_consistent_hash_exchange/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ broker_for_integration_suites()

rabbitmq_integration_suite(
name = "rabbit_exchange_type_consistent_hash_SUITE",
shard_count = 7,
runtime_deps = [
"//deps/rabbitmq_amqp_client:erlang_app",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,17 @@

all() ->
[
{group, mnesia_store},
{group, khepri_store},
{group, routing_tests},
{group, hash_ring_management_tests},
{group, clustered},
{group, khepri_migration}
].

groups() ->
[
{mnesia_store, [], [
{routing_tests, [], routing_tests()},
{hash_ring_management_tests, [], hash_ring_management_tests()},
{clustered, [], [node_restart]}
]},
{khepri_store, [], [
{routing_tests, [], routing_tests()},
{hash_ring_management_tests, [], hash_ring_management_tests()},
{clustered, [], [node_restart]}
]},
{routing_tests, [], routing_tests()},
{hash_ring_management_tests, [], hash_ring_management_tests()},
{clustered, [], [node_restart]},
{khepri_migration, [], [
from_mnesia_to_khepri
]}
Expand Down Expand Up @@ -82,14 +76,13 @@ init_per_suite(Config) ->
end_per_suite(Config) ->
rabbit_ct_helpers:run_teardown_steps(Config).

init_per_group(mnesia_store, Config) ->
rabbit_ct_helpers:set_config(Config, [{metadata_store, mnesia}]);
init_per_group(khepri_store, Config) ->
FFs = [khepri_db],
rabbit_ct_helpers:set_config(Config, [{metadata_store, {khepri, FFs}}]);
init_per_group(khepri_migration = Group, Config0) ->
Config = rabbit_ct_helpers:set_config(Config0, [{metadata_store, mnesia}]),
init_per_group(Group, Config, 1);
init_per_group(khepri_migration = Group, Config) ->
case rabbit_ct_broker_helpers:configured_metadata_store(Config) of
mnesia ->
init_per_group(Group, Config, 1);
_ ->
{skip, "This group only targets mnesia"}
end;
init_per_group(clustered = Group, Config) ->
init_per_group(Group, Config, 3);
init_per_group(Group, Config) ->
Expand All @@ -105,12 +98,6 @@ init_per_group(Group, Config, NodesCount) ->
rabbit_ct_broker_helpers:setup_steps() ++
rabbit_ct_client_helpers:setup_steps()).

end_per_group(mnesia_store, Config) ->
Config;
end_per_group(khepri_store, Config) ->
Config;
end_per_group(khepri_migration, Config) ->
Config;
end_per_group(_, Config) ->
rabbit_ct_helpers:run_teardown_steps(Config,
rabbit_ct_client_helpers:teardown_steps() ++
Expand Down
Loading