@@ -878,11 +878,11 @@ clustering_ok_with_ff_disabled_everywhere(Config) ->
878878 ok .
879879
880880clustering_ok_with_ff_enabled_on_some_nodes (Config ) ->
881- % % The test feature flag is enabled on node 2 , but not on node 1 .
881+ % % The test feature flag is enabled on node 1 , but not on node 2 .
882882 % % Clustering the two nodes should be accepted because they are
883- % % compatible. Also, the feature flag will be enabled on node 1 as a
883+ % % compatible. Also, the feature flag will be enabled on node 2 as a
884884 % % consequence.
885- enable_feature_flag_on (Config , 1 , ff_from_testsuite ),
885+ enable_feature_flag_on (Config , 0 , ff_from_testsuite ),
886886
887887 FFSubsysOk = is_feature_flag_subsystem_available (Config ),
888888
@@ -891,13 +891,13 @@ clustering_ok_with_ff_enabled_on_some_nodes(Config) ->
891891 true ->
892892 ? assertEqual ([true , true ],
893893 is_feature_flag_supported (Config , ff_from_testsuite )),
894- ? assertEqual ([false , true ],
894+ ? assertEqual ([true , false ],
895895 is_feature_flag_enabled (Config , ff_from_testsuite ));
896896 false ->
897897 ok
898898 end ,
899899
900- ? assertEqual (Config , rabbit_ct_broker_helpers :cluster_nodes (Config , 1 )),
900+ ? assertEqual (Config , rabbit_ct_broker_helpers :cluster_nodes (Config , 0 )),
901901
902902 log_feature_flags_of_all_nodes (Config ),
903903 case FFSubsysOk of
@@ -971,35 +971,35 @@ clustering_ok_with_new_ff_disabled(Config) ->
971971 ok .
972972
973973clustering_denied_with_new_ff_enabled (Config ) ->
974- % % We declare a new (fake) feature flag on node 2 . Clustering the
975- % % two nodes should then be forbidden because node 1 is sure it does
974+ % % We declare a new (fake) feature flag on node 1 . Clustering the
975+ % % two nodes should then be forbidden because node 2 is sure it does
976976 % % not support it (because the application, `rabbit` is loaded and
977977 % % it does not have it).
978978 NewFeatureFlags = #{time_travel =>
979979 #{desc => " Time travel with RabbitMQ" ,
980980 provided_by => rabbit ,
981981 stability => stable }},
982- inject_ff_on_nodes (Config , [1 ], NewFeatureFlags ),
983- enable_feature_flag_on (Config , 1 , time_travel ),
982+ inject_ff_on_nodes (Config , [0 ], NewFeatureFlags ),
983+ enable_feature_flag_on (Config , 0 , time_travel ),
984984
985985 FFSubsysOk = is_feature_flag_subsystem_available (Config ),
986986
987987 log_feature_flags_of_all_nodes (Config ),
988988 case FFSubsysOk of
989- true -> ? assertEqual ([false , true ],
989+ true -> ? assertEqual ([true , false ],
990990 is_feature_flag_supported (Config , time_travel )),
991- ? assertEqual ([false , true ],
991+ ? assertEqual ([true , false ],
992992 is_feature_flag_enabled (Config , time_travel ));
993993 false -> ok
994994 end ,
995995
996- ? assertMatch ({skip , _ }, rabbit_ct_broker_helpers :cluster_nodes (Config , 1 )),
996+ ? assertMatch ({skip , _ }, rabbit_ct_broker_helpers :cluster_nodes (Config , 0 )),
997997
998998 log_feature_flags_of_all_nodes (Config ),
999999 case FFSubsysOk of
1000- true -> ? assertEqual ([false , true ],
1000+ true -> ? assertEqual ([true , false ],
10011001 is_feature_flag_supported (Config , time_travel )),
1002- ? assertEqual ([false , true ],
1002+ ? assertEqual ([true , false ],
10031003 is_feature_flag_enabled (Config , time_travel ));
10041004 false -> ok
10051005 end ,
@@ -1036,33 +1036,33 @@ clustering_ok_with_new_ff_disabled_from_plugin_on_some_nodes(Config) ->
10361036 ok .
10371037
10381038clustering_ok_with_new_ff_enabled_from_plugin_on_some_nodes (Config ) ->
1039- % % We first enable the test plugin on node 2 and enable its feature
1039+ % % We first enable the test plugin on node 1 and enable its feature
10401040 % % flag, then we try to cluster them. Even though both nodes don't
10411041 % % share the same feature flags (the test plugin exposes one), they
10421042 % % should be considered compatible and the clustering should be
10431043 % % allowed.
1044- rabbit_ct_broker_helpers :enable_plugin (Config , 1 , " my_plugin" ),
1045- enable_feature_flag_on (Config , 1 , plugin_ff ),
1044+ rabbit_ct_broker_helpers :enable_plugin (Config , 0 , " my_plugin" ),
1045+ enable_feature_flag_on (Config , 0 , plugin_ff ),
10461046
10471047 FFSubsysOk = is_feature_flag_subsystem_available (Config ),
10481048
10491049 log_feature_flags_of_all_nodes (Config ),
10501050 case FFSubsysOk of
1051- true -> ? assertEqual ([false , true ],
1051+ true -> ? assertEqual ([true , false ],
10521052 is_feature_flag_supported (Config , plugin_ff )),
1053- ? assertEqual ([false , true ],
1053+ ? assertEqual ([true , false ],
10541054 is_feature_flag_enabled (Config , plugin_ff ));
10551055 false -> ok
10561056 end ,
10571057
1058- ? assertEqual (Config , rabbit_ct_broker_helpers :cluster_nodes (Config , 1 )),
1058+ ? assertEqual (Config , rabbit_ct_broker_helpers :cluster_nodes (Config , 0 )),
10591059
10601060 log_feature_flags_of_all_nodes (Config ),
10611061 case FFSubsysOk of
10621062 true ->
10631063 ? assertEqual ([true , true ],
10641064 is_feature_flag_supported (Config , plugin_ff )),
1065- ? assertEqual ([false , true ],
1065+ ? assertEqual ([true , false ],
10661066 is_feature_flag_enabled (Config , plugin_ff ));
10671067 false ->
10681068 ok
0 commit comments