Skip to content

Commit ecb7575

Browse files
committed
Skip cluster_minority_SUITE when RABBITMQ_METADATA_STORE is set to mnesia
This suite is only meant to run with Khepri as the metadata store. Instead of setting this explicitly we can look at the configured metadata store and conditionally skip the entire suite. This prevents these tests from running twice in CI.
1 parent bda1f7c commit ecb7575

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

deps/rabbit/test/cluster_minority_SUITE.erl

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,20 @@ suite() ->
5454
%% Testsuite setup/teardown.
5555
%% -------------------------------------------------------------------
5656

57-
init_per_suite(Config0) ->
57+
init_per_suite(Config) ->
5858
rabbit_ct_helpers:log_environment(),
59-
Config = rabbit_ct_helpers:set_config(Config0, [{metadata_store, khepri}]),
60-
rabbit_ct_helpers:run_setup_steps(Config,
61-
[
62-
fun rabbit_ct_broker_helpers:configure_dist_proxy/1
63-
]).
59+
case rabbit_ct_broker_helpers:configured_metadata_store(Config) of
60+
mnesia ->
61+
%% This SUITE is meant to test how Khepri behaves in a minority,
62+
%% so mnesia should be skipped.
63+
{skip, "Minority testing not supported by mnesia"};
64+
_ ->
65+
rabbit_ct_helpers:run_setup_steps(
66+
Config,
67+
[
68+
fun rabbit_ct_broker_helpers:configure_dist_proxy/1
69+
])
70+
end.
6471

6572
end_per_suite(Config) ->
6673
rabbit_ct_helpers:run_teardown_steps(Config).

0 commit comments

Comments
 (0)