Skip to content

Commit c8cb9ef

Browse files
committed
feature_flags_SUITE: Use ff_from_testsuite wherever possible
... instead of all feature flags. Using all feature flags in a testcase is not possible if we configure a secondary Umbrella which don't have the same feature flags set. Before this change, the testcases failed because of those other incompatible feature flags. (cherry picked from commit fc81a13)
1 parent 5d8f403 commit c8cb9ef

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

test/feature_flags_SUITE.erl

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -635,11 +635,11 @@ clustering_ok_with_ff_disabled_everywhere(Config) ->
635635
ok.
636636

637637
clustering_ok_with_ff_enabled_on_some_nodes(Config) ->
638-
%% All feature flags are enabled on node 1, but not on node 2.
638+
%% The test feature flag is enabled on node 1, but not on node 2.
639639
%% Clustering the two nodes should be accepted because they are
640-
%% compatible. Also, feature flags will be enabled on node 2 as a
640+
%% compatible. Also, the feature flag will be enabled on node 2 as a
641641
%% consequence.
642-
enable_all_feature_flags_on(Config, 0),
642+
enable_feature_flag_on(Config, 0, ff_from_testsuite),
643643

644644
FFSubsysOk = is_feature_flag_subsystem_available(Config),
645645

@@ -667,9 +667,9 @@ clustering_ok_with_ff_enabled_on_some_nodes(Config) ->
667667
ok.
668668

669669
clustering_ok_with_ff_enabled_everywhere(Config) ->
670-
%% All feature flags are enabled. Clustering the two nodes should be
671-
%% accepted because they are compatible.
672-
enable_all_feature_flags_everywhere(Config),
670+
%% The test feature flags is enabled. Clustering the two nodes
671+
%% should be accepted because they are compatible.
672+
enable_feature_flag_everywhere(Config, ff_from_testsuite),
673673

674674
FFSubsysOk = is_feature_flag_subsystem_available(Config),
675675

@@ -803,7 +803,7 @@ clustering_ok_with_new_ff_enabled_from_plugin_on_some_nodes(Config) ->
803803
%% should be considered compatible and the clustering should be
804804
%% allowed.
805805
rabbit_ct_broker_helpers:enable_plugin(Config, 0, "my_plugin"),
806-
enable_all_feature_flags_on(Config, 0),
806+
enable_feature_flag_on(Config, 0, plugin_ff),
807807

808808
FFSubsysOk = is_feature_flag_subsystem_available(Config),
809809

@@ -917,13 +917,9 @@ enable_feature_flag_on(Config, Node, FeatureName) ->
917917
rabbit_ct_broker_helpers:rpc(
918918
Config, Node, rabbit_feature_flags, enable, [FeatureName]).
919919

920-
enable_all_feature_flags_on(Config, Node) ->
921-
rabbit_ct_broker_helpers:rpc(
922-
Config, Node, rabbit_feature_flags, enable_all, []).
923-
924-
enable_all_feature_flags_everywhere(Config) ->
920+
enable_feature_flag_everywhere(Config, FeatureName) ->
925921
rabbit_ct_broker_helpers:rpc_all(
926-
Config, rabbit_feature_flags, enable_all, []).
922+
Config, rabbit_feature_flags, enable, [FeatureName]).
927923

928924
is_feature_flag_supported(Config, FeatureName) ->
929925
rabbit_ct_broker_helpers:rpc_all(

0 commit comments

Comments
 (0)