@@ -160,7 +160,7 @@ end_per_testcase(Testcase, Config) ->
160160simple (Config ) ->
161161 with_ch (Config ,
162162 fun (Ch ) ->
163- expect_federation (Ch , <<" upstream" >>, <<" fed .downstream" >>)
163+ expect_federation (Ch , <<" upstream" >>, <<" fed1 .downstream" >>)
164164 end , upstream_downstream (Config )).
165165
166166multiple_upstreams_pattern (Config ) ->
@@ -200,9 +200,9 @@ multiple_downstreams(Config) ->
200200 with_ch (Config ,
201201 fun (Ch ) ->
202202 timer :sleep (? INITIAL_WAIT ),
203- expect_federation (Ch , <<" upstream" >>, <<" fed .downstream" >>, ? EXPECT_FEDERATION_TIMEOUT ),
204- expect_federation (Ch , <<" upstream " >>, <<" fed.downstream2 " >>, ? EXPECT_FEDERATION_TIMEOUT )
205- end , upstream_downstream (Config ) ++ [q (<<" fed.downstream2 " >>, Args )]).
203+ expect_federation (Ch , <<" upstream" >>, <<" fed1 .downstream" >>, ? EXPECT_FEDERATION_TIMEOUT ),
204+ expect_federation (Ch , <<" upstream2 " >>, <<" fed2.downstream " >>, ? EXPECT_FEDERATION_TIMEOUT )
205+ end , upstream_downstream (Config ) ++ [q (<<" fed2.downstream " >>, Args )]).
206206
207207message_flow (Config ) ->
208208 % % TODO: specifc source / target here
@@ -236,11 +236,11 @@ dynamic_reconfiguration(Config) ->
236236 with_ch (Config ,
237237 fun (Ch ) ->
238238 timer :sleep (? INITIAL_WAIT ),
239- expect_federation (Ch , <<" upstream" >>, <<" fed .downstream" >>, ? EXPECT_FEDERATION_TIMEOUT ),
239+ expect_federation (Ch , <<" upstream" >>, <<" fed1 .downstream" >>, ? EXPECT_FEDERATION_TIMEOUT ),
240240
241241 % % Test that clearing connections works
242242 clear_upstream (Config , 0 , <<" localhost" >>),
243- expect_no_federation (Ch , <<" upstream" >>, <<" fed .downstream" >>),
243+ expect_no_federation (Ch , <<" upstream" >>, <<" fed1 .downstream" >>),
244244
245245 % % Test that reading them and changing them works
246246 set_upstream (Config , 0 ,
@@ -249,45 +249,46 @@ dynamic_reconfiguration(Config) ->
249249 URI = rabbit_ct_broker_helpers :node_uri (Config , 0 , [use_ipaddr ]),
250250 set_upstream (Config , 0 , <<" localhost" >>, URI ),
251251 set_upstream (Config , 0 , <<" localhost" >>, URI ),
252- expect_federation (Ch , <<" upstream" >>, <<" fed .downstream" >>)
252+ expect_federation (Ch , <<" upstream" >>, <<" fed1 .downstream" >>)
253253 end , upstream_downstream (Config )).
254254
255255federate_unfederate (Config ) ->
256256 Args = ? config (target_queue_args , Config ),
257257 with_ch (Config ,
258258 fun (Ch ) ->
259259 timer :sleep (? INITIAL_WAIT ),
260- expect_federation (Ch , <<" upstream" >>, <<" fed .downstream" >>, ? EXPECT_FEDERATION_TIMEOUT ),
261- expect_federation (Ch , <<" upstream " >>, <<" fed.downstream2 " >>, ? EXPECT_FEDERATION_TIMEOUT ),
260+ expect_federation (Ch , <<" upstream" >>, <<" fed1 .downstream" >>, ? EXPECT_FEDERATION_TIMEOUT ),
261+ expect_federation (Ch , <<" upstream2 " >>, <<" fed2.downstream " >>, ? EXPECT_FEDERATION_TIMEOUT ),
262262
263263 % % clear the policy
264264 rabbit_ct_broker_helpers :clear_policy (Config , 0 , <<" fed" >>),
265265
266- expect_no_federation (Ch , <<" upstream" >>, <<" fed .downstream" >>),
267- expect_no_federation (Ch , <<" upstream " >>, <<" fed.downstream2 " >>),
266+ expect_no_federation (Ch , <<" upstream" >>, <<" fed1 .downstream" >>),
267+ expect_no_federation (Ch , <<" upstream2 " >>, <<" fed2.downstream " >>),
268268
269269 rabbit_ct_broker_helpers :set_policy (Config , 0 ,
270- <<" fed" >>, <<" ^fed \. " >>, <<" all" >>, [
270+ <<" fed" >>, <<" ^fed1 \. " >>, <<" all" >>, [
271271 {<<" federation-upstream-set" >>, <<" upstream" >>}])
272- end , upstream_downstream (Config ) ++ [q (<<" fed.downstream2 " >>, Args )]).
272+ end , upstream_downstream (Config ) ++ [q (<<" fed2.downstream " >>, Args )]).
273273
274274dynamic_plugin_stop_start (Config ) ->
275- DownQ2 = <<" fed.downstream2 " >>,
275+ DownQ2 = <<" fed2.downstream " >>,
276276 Args = ? config (target_queue_args , Config ),
277277 with_ch (Config ,
278278 fun (Ch ) ->
279279 timer :sleep (? INITIAL_WAIT ),
280- UpQ = <<" upstream" >>,
281- DownQ1 = <<" fed.downstream" >>,
282- expect_federation (Ch , UpQ , DownQ1 , ? EXPECT_FEDERATION_TIMEOUT ),
283- expect_federation (Ch , UpQ , DownQ2 , ? EXPECT_FEDERATION_TIMEOUT ),
280+ UpQ1 = <<" upstream" >>,
281+ UpQ2 = <<" upstream2" >>,
282+ DownQ1 = <<" fed1.downstream" >>,
283+ expect_federation (Ch , UpQ1 , DownQ1 , ? EXPECT_FEDERATION_TIMEOUT ),
284+ expect_federation (Ch , UpQ2 , DownQ2 , ? EXPECT_FEDERATION_TIMEOUT ),
284285
285286 % % Disable the plugin, the link disappears
286287 ct :pal (" Stopping rabbitmq_federation" ),
287288 ok = rabbit_ct_broker_helpers :disable_plugin (Config , 0 , " rabbitmq_federation" ),
288289
289- expect_no_federation (Ch , UpQ , DownQ1 ),
290- expect_no_federation (Ch , UpQ , DownQ2 ),
290+ expect_no_federation (Ch , UpQ1 , DownQ1 ),
291+ expect_no_federation (Ch , UpQ2 , DownQ2 ),
291292
292293 maybe_declare_queue (Config , Ch , q (DownQ1 , Args )),
293294 maybe_declare_queue (Config , Ch , q (DownQ2 , Args )),
@@ -305,12 +306,13 @@ dynamic_plugin_stop_start(Config) ->
305306 Entry || Entry <- Status ,
306307 proplists :get_value (queue , Entry ) =:= DownQ1 orelse
307308 proplists :get_value (queue , Entry ) =:= DownQ2 ,
308- proplists :get_value (upstream_queue , Entry ) =:= UpQ ,
309+ proplists :get_value (upstream_queue , Entry ) =:= UpQ1 orelse
310+ proplists :get_value (upstream_queue , Entry ) =:= UpQ2 ,
309311 proplists :get_value (status , Entry ) =:= running
310312 ],
311313 length (L ) =:= 2
312314 end ),
313- expect_federation (Ch , UpQ , DownQ1 , 120000 )
315+ expect_federation (Ch , UpQ1 , DownQ1 , 120000 )
314316 end , upstream_downstream (Config ) ++ [q (DownQ2 , Args )]).
315317
316318restart_upstream (Config ) ->
@@ -392,4 +394,4 @@ upstream_downstream() ->
392394upstream_downstream (Config ) ->
393395 SourceArgs = ? config (source_queue_args , Config ),
394396 TargetArgs = ? config (target_queue_args , Config ),
395- [q (<<" upstream" >>, SourceArgs ), q (<<" fed .downstream" >>, TargetArgs )].
397+ [q (<<" upstream" >>, SourceArgs ), q (<<" fed1 .downstream" >>, TargetArgs )].
0 commit comments