@@ -882,11 +882,11 @@ clustering_ok_with_ff_disabled_everywhere(Config) ->
882882 ok .
883883
884884clustering_ok_with_ff_enabled_on_some_nodes (Config ) ->
885- % % The test feature flag is enabled on node 1 , but not on node 2 .
885+ % % The test feature flag is enabled on node 2 , but not on node 1 .
886886 % % Clustering the two nodes should be accepted because they are
887- % % compatible. Also, the feature flag will be enabled on node 2 as a
887+ % % compatible. Also, the feature flag will be enabled on node 1 as a
888888 % % consequence.
889- enable_feature_flag_on (Config , 0 , ff_from_testsuite ),
889+ enable_feature_flag_on (Config , 1 , ff_from_testsuite ),
890890
891891 FFSubsysOk = is_feature_flag_subsystem_available (Config ),
892892
@@ -895,13 +895,13 @@ clustering_ok_with_ff_enabled_on_some_nodes(Config) ->
895895 true ->
896896 ? assertEqual ([true , true ],
897897 is_feature_flag_supported (Config , ff_from_testsuite )),
898- ? assertEqual ([true , false ],
898+ ? assertEqual ([false , true ],
899899 is_feature_flag_enabled (Config , ff_from_testsuite ));
900900 false ->
901901 ok
902902 end ,
903903
904- ? assertEqual (Config , rabbit_ct_broker_helpers :cluster_nodes (Config , 0 )),
904+ ? assertEqual (Config , rabbit_ct_broker_helpers :cluster_nodes (Config , 1 )),
905905
906906 log_feature_flags_of_all_nodes (Config ),
907907 case FFSubsysOk of
@@ -975,35 +975,35 @@ clustering_ok_with_new_ff_disabled(Config) ->
975975 ok .
976976
977977clustering_denied_with_new_ff_enabled (Config ) ->
978- % % We declare a new (fake) feature flag on node 1 . Clustering the
979- % % two nodes should then be forbidden because node 2 is sure it does
978+ % % We declare a new (fake) feature flag on node 2 . Clustering the
979+ % % two nodes should then be forbidden because node 1 is sure it does
980980 % % not support it (because the application, `rabbit` is loaded and
981981 % % it does not have it).
982982 NewFeatureFlags = #{time_travel =>
983983 #{desc => " Time travel with RabbitMQ" ,
984984 provided_by => rabbit ,
985985 stability => stable }},
986- inject_ff_on_nodes (Config , [0 ], NewFeatureFlags ),
987- enable_feature_flag_on (Config , 0 , time_travel ),
986+ inject_ff_on_nodes (Config , [1 ], NewFeatureFlags ),
987+ enable_feature_flag_on (Config , 1 , time_travel ),
988988
989989 FFSubsysOk = is_feature_flag_subsystem_available (Config ),
990990
991991 log_feature_flags_of_all_nodes (Config ),
992992 case FFSubsysOk of
993- true -> ? assertEqual ([true , false ],
993+ true -> ? assertEqual ([false , true ],
994994 is_feature_flag_supported (Config , time_travel )),
995- ? assertEqual ([true , false ],
995+ ? assertEqual ([false , true ],
996996 is_feature_flag_enabled (Config , time_travel ));
997997 false -> ok
998998 end ,
999999
1000- ? assertMatch ({skip , _ }, rabbit_ct_broker_helpers :cluster_nodes (Config , 0 )),
1000+ ? assertMatch ({skip , _ }, rabbit_ct_broker_helpers :cluster_nodes (Config , 1 )),
10011001
10021002 log_feature_flags_of_all_nodes (Config ),
10031003 case FFSubsysOk of
1004- true -> ? assertEqual ([true , false ],
1004+ true -> ? assertEqual ([false , true ],
10051005 is_feature_flag_supported (Config , time_travel )),
1006- ? assertEqual ([true , false ],
1006+ ? assertEqual ([false , true ],
10071007 is_feature_flag_enabled (Config , time_travel ));
10081008 false -> ok
10091009 end ,
@@ -1040,33 +1040,33 @@ clustering_ok_with_new_ff_disabled_from_plugin_on_some_nodes(Config) ->
10401040 ok .
10411041
10421042clustering_ok_with_new_ff_enabled_from_plugin_on_some_nodes (Config ) ->
1043- % % We first enable the test plugin on node 1 and enable its feature
1043+ % % We first enable the test plugin on node 2 and enable its feature
10441044 % % flag, then we try to cluster them. Even though both nodes don't
10451045 % % share the same feature flags (the test plugin exposes one), they
10461046 % % should be considered compatible and the clustering should be
10471047 % % allowed.
1048- rabbit_ct_broker_helpers :enable_plugin (Config , 0 , " my_plugin" ),
1049- enable_feature_flag_on (Config , 0 , plugin_ff ),
1048+ rabbit_ct_broker_helpers :enable_plugin (Config , 1 , " my_plugin" ),
1049+ enable_feature_flag_on (Config , 1 , plugin_ff ),
10501050
10511051 FFSubsysOk = is_feature_flag_subsystem_available (Config ),
10521052
10531053 log_feature_flags_of_all_nodes (Config ),
10541054 case FFSubsysOk of
1055- true -> ? assertEqual ([true , false ],
1055+ true -> ? assertEqual ([false , true ],
10561056 is_feature_flag_supported (Config , plugin_ff )),
1057- ? assertEqual ([true , false ],
1057+ ? assertEqual ([false , true ],
10581058 is_feature_flag_enabled (Config , plugin_ff ));
10591059 false -> ok
10601060 end ,
10611061
1062- ? assertEqual (Config , rabbit_ct_broker_helpers :cluster_nodes (Config , 0 )),
1062+ ? assertEqual (Config , rabbit_ct_broker_helpers :cluster_nodes (Config , 1 )),
10631063
10641064 log_feature_flags_of_all_nodes (Config ),
10651065 case FFSubsysOk of
10661066 true ->
10671067 ? assertEqual ([true , true ],
10681068 is_feature_flag_supported (Config , plugin_ff )),
1069- ? assertEqual ([true , false ],
1069+ ? assertEqual ([false , true ],
10701070 is_feature_flag_enabled (Config , plugin_ff ));
10711071 false ->
10721072 ok
0 commit comments