@@ -154,44 +154,15 @@ init_per_testcase(Testcase, Config) ->
154154 % % The exchange output requires RabbitMQ to run. All testcases in this
155155 % % group will run in the context of that RabbitMQ node.
156156 exchange_output ->
157- Config1 = rabbit_ct_helpers :set_config (
158- Config ,
159- [{rmq_nodename_suffix , Testcase }]),
160- Config2 = (
161- case Testcase of
162- use_exchange_logger_when_enabling_khepri_db ->
163- rabbit_ct_helpers :set_config (
164- Config1 ,
165- [{rmq_nodes_count , 3 },
166- {metadata_store , mnesia }]);
167- use_exchange_logger_when_enabling_all_feature_flags ->
168- rabbit_ct_helpers :set_config (
169- Config1 ,
170- [{rmq_nodes_count , 3 }]);
171- _ ->
172- rabbit_ct_helpers :set_config (
173- Config1 ,
174- [{rmq_nodes_count , 1 }])
175- end ),
176- LogCfg = {log , [
177- {exchange , [{enabled , true }, {level , debug }]},
178- {file , [{level , debug }]}
179- ]},
180- Config3 = (
181- case Testcase of
182- use_exchange_logger_when_enabling_all_feature_flags ->
183- rabbit_ct_helpers :merge_app_env (
184- Config2 , {rabbit , [LogCfg ,
185- {forced_feature_flags_on_init , []}
186- ]});
187- _ ->
188- rabbit_ct_helpers :merge_app_env (
189- Config2 , {rabbit , [LogCfg ]})
190- end ),
191- rabbit_ct_helpers :run_steps (
192- Config3 ,
193- rabbit_ct_broker_helpers :setup_steps () ++
194- rabbit_ct_client_helpers :setup_steps ());
157+ case Testcase =:= use_exchange_logger_when_enabling_all_feature_flags
158+ andalso rabbit_ct_helpers :is_mixed_versions () of
159+ true ->
160+ {skip ,
161+ " use_exchange_logger_when_enabling_all_feature_flags has a 4.2.x/3.13.7 "
162+ " mixed mode incompatibility due to the lists of stable feature flags." };
163+ false ->
164+ init_per_testcase_exchange_output (Testcase , Config )
165+ end ;
195166
196167 % % Other groups and testcases run the tested code directly without a
197168 % % RabbitMQ node running.
@@ -205,6 +176,46 @@ init_per_testcase(Testcase, Config) ->
205176 Config , {log_base_dir , LogBaseDir })
206177 end .
207178
179+ init_per_testcase_exchange_output (Testcase , Config ) ->
180+ Config1 = rabbit_ct_helpers :set_config (
181+ Config ,
182+ [{rmq_nodename_suffix , Testcase }]),
183+ Config2 = (
184+ case Testcase of
185+ use_exchange_logger_when_enabling_khepri_db ->
186+ rabbit_ct_helpers :set_config (
187+ Config1 ,
188+ [{rmq_nodes_count , 3 },
189+ {metadata_store , mnesia }]);
190+ use_exchange_logger_when_enabling_all_feature_flags ->
191+ rabbit_ct_helpers :set_config (
192+ Config1 ,
193+ [{rmq_nodes_count , 3 }]);
194+ _ ->
195+ rabbit_ct_helpers :set_config (
196+ Config1 ,
197+ [{rmq_nodes_count , 1 }])
198+ end ),
199+ LogCfg = {log , [
200+ {exchange , [{enabled , true }, {level , debug }]},
201+ {file , [{level , debug }]}
202+ ]},
203+ Config3 = (
204+ case Testcase of
205+ use_exchange_logger_when_enabling_all_feature_flags ->
206+ rabbit_ct_helpers :merge_app_env (
207+ Config2 , {rabbit , [LogCfg ,
208+ {forced_feature_flags_on_init , []}
209+ ]});
210+ _ ->
211+ rabbit_ct_helpers :merge_app_env (
212+ Config2 , {rabbit , [LogCfg ]})
213+ end ),
214+ rabbit_ct_helpers :run_steps (
215+ Config3 ,
216+ rabbit_ct_broker_helpers :setup_steps () ++
217+ rabbit_ct_client_helpers :setup_steps ()).
218+
208219end_per_testcase (Testcase , Config ) ->
209220 Config1 = case rabbit_ct_helpers :get_config (Config , rmq_nodes_count ) of
210221 undefined ->
0 commit comments